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/)
-   -   valve directed by pressure (https://www.cfd-online.com/Forums/fluent-udf/171520-valve-directed-pressure.html)

flo90000 May 10, 2016 10:36

valve directed by pressure
 
Hello

I want to write an UDF who moves a valve in function of the pressure around it. But I don't know how to do it in function of the pressure applied or if I should write a pivoting link between the valve and the support and the pressure will move the valve directly.

Thanks for your advices or help.

pakk May 11, 2016 03:28

There is no need to ask exactly the same question three times.

Edit: the two other threads have since been removed.

`e` May 11, 2016 04:08

You could move the valve as a function of the pressure in the fluid by using the dynamic mesh (moving/deforming mesh model). Specifically, use the DEFINE_GRID_MOTION macro and displace the valve boundary nodes as a function of the local pressure (with the C_P macro). Take care to ensure a high mesh quality is conserved throughout your simulation; use deforming for small valve displacements and enable remeshing should your geometry change significantly.

flo90000 May 23, 2016 05:07

Quote:

Originally Posted by `e` (Post 599583)
You could move the valve as a function of the pressure in the fluid by using the dynamic mesh (moving/deforming mesh model). Specifically, use the DEFINE_GRID_MOTION macro and displace the valve boundary nodes as a function of the local pressure (with the C_P macro). Take care to ensure a high mesh quality is conserved throughout your simulation; use deforming for small valve displacements and enable remeshing should your geometry change significantly.

Hello

thanks for your answer `e`. I am a beginner in the using of UDF so I searched how to use the DEFINE_GRID_MOTION macro with the C_P macro. Is it possible to have an example?

`e` May 23, 2016 07:08

The UDF manual is a good place to start learning how to code user-defined functions as they describe what each function does and also provides examples. C_P is a flow variable macro which retrieves the local cell pressure (it's not specific to the dynamic mesh). The example in the manual for the grid motion describes the deflection of a cantilever beam (start with this example and then change the dependent variable to pressure).


All times are GMT -4. The time now is 23:04.