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. |
There is no need to ask exactly the same question three times.
Edit: the two other threads have since been removed. |
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.
|
Quote:
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? |
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 17:57. |