CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   6DOF for spring valve motion problem (https://www.cfd-online.com/Forums/fluent-udf/158230-6dof-spring-valve-motion-problem.html)

 ahehuhehuh August 19, 2015 03:08

6DOF for spring valve motion problem

2 Attachment(s)
Dear all~
I want solve the problem that 6DOF constant spring motion in 2-D
Using DEFINE_SDOF_PROPERTIES

But it's results weird.. something likes function of sine..
How can i write 6DOF function?

Here are some attachment.
first, using the 6DOF

#include "udf.h"
#define spring_constant 1.5 /*idonknow*/
#define original_pin_cg_y 3.25e-4

DEFINE_SDOF_PROPERTIES(Pinconst_1_5, prop, dt, time, dtime)
{

real pin_movement_y;
prop[SDOF_MASS] = 6.792e-6;
prop[SDOF_IXX] = 6.4059e-11;
prop[SDOF_IYY] = 6.28e-13;
prop[SDOF_IZZ] = 6.4676e-11;
prop[SDOF_ZERO_TRANS_X] = TRUE;
prop[SDOF_ZERO_TRANS_Z] = TRUE;
prop[SDOF_ZERO_ROT_X] = TRUE;
prop[SDOF_ZERO_ROT_Y] = TRUE;
prop[SDOF_ZERO_ROT_Z] = TRUE;

pin_movement_y = (DT_CG(dt)[1] - original_pin_cg_y);
Message("DT_CG = %e, %e, %e\n",DT_CG(dt)[0], DT_CG(dt)[1], DT_CG(dt)[2]);
prop[SDOF_LOAD_F_Y] = - spring_constant * pin_movement_y;
}

model and mesh for simulation,
results of coordinate for <Time vs 'wall box positions'>

Thanks:)

 LucasGasparino3110 February 26, 2018 14:36

Hi there mate!!

Did you get any closure in your case? For me, the sine-like motion doesn't seem wrong, tbh. Is your UDF used as interpret or compiled? I'm having a similar case but with the addition of torsion, so I'm willing to try your solution, as it is the only reference I got that uses a spring...

Thank you very much!

 PRIDEmartins April 18, 2018 16:39

It is not wrong what you have done.
In my opinion, there are only two things missing in here:

I. a damping coeficient. Something like: -c*DT_VEL_GD(dt), on the force equation, in order to make the system more stable.

II. Descrease the time step.

For I: try using: zeta = c/2*sqrt(M*K), for correctly determing your damping coeficient, c.

For II, a good start point is: dt = fn/50 (fn = system's natural frequency, given by: fn = sqrt(k/m)/2*pi.

For me, in II, the frequency of vortex sheeding is also a good idea. Use the Strouhal nunber, St=0.2, to guess f_vortex e try doing the same.

Sorry for the bad English. I'm in a hurry in here.

 All times are GMT -4. The time now is 09:56.