Ansys Learning Forum › Forums › Discuss Simulation › Fluids › moment on a tank in ansys fluent › Reply To: moment on a tank in ansys fluent
April 19, 2024 at 6:33 am
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);
}