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/)
-   -   how to use DEFINE_GEOM to change the geometry with time? (https://www.cfd-online.com/Forums/fluent-udf/206780-how-use-define_geom-change-geometry-time.html)

dengdeng September 13, 2018 05:08

how to use DEFINE_GEOM to change the geometry with time?
 
Hi,
I am simulating the flow around an object deforming with time. The time-dependent function of the boundary is already known(it has the form of y=f(x,t)).
I've got some basic infomation of DEFINE_GEOM on this page:
http:////www.sharcnet.ca/Software/An...fine_geom.html
However, it seems no argument related to time is included in this script. I tried to add the variable time like this:
Code:

DEFINE_GEOM(BL_FP1,domain,dt,position,time)
and the UDF failed to be compiled.
Has anyone worked on similar case before? Any help or suggestion is welcome.
Thank you.

blackmask September 13, 2018 06:12

You can use the following code.

Code:

DEFINE_GEOM (BL_FP1, d, dt, position)
{
real time = CURRENT_TIME;



...

}


dengdeng September 13, 2018 09:06

It works! Thank you : )


All times are GMT -4. The time now is 16:38.