CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   2 degree of freedom in one direction UDF (https://www.cfd-online.com/Forums/fluent-udf/130723-2-degree-freedom-one-direction-udf.html)

linh nguyen March 3, 2014 10:24

2 degree of freedom in one direction UDF
 
Hi,

I am doing simulation for flow around free oscillating cylinder. The cylinder was attach with the mass by spring which can be consider as 2 DOF system in one direction (y direction) not 1DOF for each (x, y direction).

I using SDOF in Fluent for single degree of freedom case and it was working fine. But when it's come to 2 DOF, I have no idea how to start.

I am very grateful if anybody can give me some suggestion how to start.

Best Regards

ghost82 March 5, 2014 05:53

You can use the 6dof solver and create an udf with body properties and use the following lines to have restricted motion:

Transational motion in x direction is not allowed:
Code:

prop[SDOF_ZERO_TRANS_X] = TRUE;
Transational motion in x direction is allowed:
Code:

prop[SDOF_ZERO_TRANS_X] = FALSE;
Transational motion in y direction is not allowed:
Code:

prop[SDOF_ZERO_TRANS_Y] = TRUE;
Transational motion in y direction is allowed:
Code:

prop[SDOF_ZERO_TRANS_Y] = FALSE;
Transational motion in z direction is not allowed:
Code:

prop[SDOF_ZERO_TRANS_Z] = TRUE;
Transational motion in z direction is allowed:
Code:

prop[SDOF_ZERO_TRANS_Z] = FALSE;
Rotational motion around x axis is not allowed:
Code:

prop[SDOF_ZERO_ROT_X] = TRUE;
Rotational motion around x axis is allowed:
Code:

prop[SDOF_ZERO_ROT_X] = FALSE;
Rotational motion around y axis is not allowed:
Code:

prop[SDOF_ZERO_ROT_Y] = TRUE;
Rotational motion around y axis is allowed:
Code:

prop[SDOF_ZERO_ROT_Y] = FALSE;
Rotational motion around z axis is not allowed:
Code:

prop[SDOF_ZERO_ROT_Z] = TRUE;
Rotational motion around z axis is allowed:
Code:

prop[SDOF_ZERO_ROT_Z] = FALSE;
Daniele

linh nguyen March 7, 2014 05:50

1 Attachment(s)
Thank Daniele,

I have used this SDOF Macro already for Single degree of cylinder system I have done before and I quite familiar with SDOF Macro. But now I am doing 2DOF in 1 direction, that, the cylinder in the flow domain will be attached with a Mass (see attachment). Do you think in Fluent they have a Macro for this or I have to write my own UDF for this case.


Linh


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