Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

moment on a tank in ansys fluent

    • vikram chahal
      Subscriber

      I have a fluid tank and that is partially filled by water. I want to apply a moment on the base of tank through UDF, for that i am using define CG macro. could you please help me how can i do that??

    • Prashanth
      Ansys Employee

      Hi: Can you elaborate more on applying moment on base of tank?

      • vikram chahal
        Subscriber

        yes sir, i am using an UDF described below and hooking at the base of tank by taking rigid body motion,

        #include "udf.h"

        DEFINE_PROFILE(moment_profile, thread, position)
        {
            real t = real t = CURRENT_TIME;
            real moment = 0.0;

            // Apply moment in the z-direction for 2 seconds
            if (t <= 2.0) {
                moment = 5000; // Replace 'your_moment_value' with the desired moment
            }

            // Set the moment components
            real moment_vector[ND_ND];
            moment_vector[0] = 0.0;  // Moment in x-direction (assuming no moment in x)
            moment_vector[1] = 0.0;  // Moment in y-direction (assuming no moment in y)
            moment_vector[2] = moment;  // Moment in z-direction

            // Assign the moment components
            NV_VS(position, =, moment_vector);
        }
Viewing 1 reply thread
  • The topic ‘moment on a tank in ansys fluent’ is closed to new replies.