|
[Sponsors] |
January 24, 2012, 18:44 |
UDF fails to model 9.81m/s^2 gravity
|
#1 |
Member
Join Date: Apr 2009
Posts: 94
Rep Power: 17 |
Hello,
I tried to add a z-momentum source term to model constant gravity of 9.81 m/s^2. The UDF is below. Gravity in operating conditions panel was turned off. Then I removed the UDF and turned gravity on in operating conditions panel and set "operating density" to 0. The UDF failed to model 9.81m/s^2 gravity. Would anyone know why? UDF file>>>>>> #include "udf.h" DEFINE_SOURCE(gravity_source,c,t,dS,eqn) { /* VAR */ double xc[ND_ND]; double gravity; double source; /* BEGIN */ C_CENTROID(xc,c,t); gravity = 9.81; source = gravity*C_R(c,t); /*rho g */ return source; } |
|
January 24, 2012, 19:06 |
|
#2 | |
Senior Member
Real Name :)
Join Date: Jan 2010
Location: United States
Posts: 192
Rep Power: 16 |
JPO,
First: think about posting udf-related questions in the UDF forum (http://www.cfd-online.com/Forums/fluent-udf/) Next: how is it failing? What are the error messages? ComputerGuy Quote:
|
||
January 24, 2012, 19:15 |
|
#3 |
Member
Join Date: Apr 2009
Posts: 94
Rep Power: 17 |
ComputerGuy, Thank you for suggesting the UDF forum. I was not aware of it.
How it fails? - Residuals oscillate and do not converge... The same case without UDF (gravity is defined in the oper. conditions panel) converges well. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 08:18 |
UDF for defining granular viscosity in mixture model | priyanka.asp | Fluent UDF and Scheme Programming | 7 | May 19, 2019 19:16 |
How to access only one phase in multiphase model by UDF | wersoe | Fluent UDF and Scheme Programming | 1 | January 4, 2017 08:11 |
udf: volume fraction gradient in eulerian model | jwwang | FLUENT | 22 | April 15, 2015 07:27 |
UDF: how to know domain number in the model? | mssound | FLUENT | 0 | May 17, 2010 16:00 |