Ansys Learning Forum Forums Discuss Simulation Fluids coupled simulation of vehicle and fluid tank Reply To: coupled simulation of vehicle and fluid tank

vikram chahal
Subscriber

IN THIS WAY , PLEASE SUGGEST IF ANY CHANGES ARE REQUIRED

  // Apply the body force to the fluid domain
        t = Lookup_Thread(domain, 3); // Assuming FLUID_THREAD_ID is the ID of the fluid thread
        thread_loop_c(t, d)
        {
            C_UDMI(c, t, 0) = vehicle_force_x;
            C_UDMI(c, t, 1) = vehicle_force_y;
            C_UDMI(c, t, 2) = vehicle_force_z;
           
             // Apply the moment components based on vehicle response
            // Here, we'll assume all the moments act around the z-axis
            C_UDMI(c, t, 3) = 0.0; // Moment about x-axis
            C_UDMI(c, t, 4) = 0.0; // Moment about y-axis
            C_UDMI(c, t, 5) = vehicle_moment_z; // Moment about z-axis
        }