|
[Sponsors] |
boundary condition in fluent, which is a function of density |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 28, 2017, 13:08 |
boundary condition in fluent, which is a function of density
|
#1 |
New Member
mohammad daneshmandi
Join Date: Dec 2017
Posts: 4
Rep Power: 8 |
Dear all
I want to add a boundary condition in fluent, which is a function of density. For this aim I wrote an UDF code to evaluate the density on the surface of boundary. But a segmentation error has occurred. I know what this error is but I do not know how to fix it and my algorithm is right or not? Thank you in advance for your help. #include "udf.h" DEFINE_PROFILE(inlet_pressure1,t,i) { real x[ND_ND]; real rr1; real vv; Thread *tf; face_t f; cell_t c; int n; begin_c_loop(c, t) /* loops over cells in a cell thread */ { rr1=C_R(c,t); c_face_loop(c, t, n) /* loops over all faces of a cell */ { f=C_FACE(c,t,n); tf=C_FACE_THREAD(c,t,n); vv=sqrt(pow (F_U(f,t),2)+pow (F_V(f,t),2)+pow (F_W(f,t),2)); F_PROFILE(f,tf,i)=40000000-0.5*rr1*pow (vv,2); } } end_c_loop(c, t) } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 18:02 |
Question about heat transfer coefficient setting for CFX | Anna Tian | CFX | 1 | June 16, 2013 06:28 |
[blockMesh] non-orthogonal faces and incorrect orientation? | nennbs | OpenFOAM Meshing & Mesh Conversion | 7 | April 17, 2013 05:42 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 09:56 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 20:50 |