|
[Sponsors] |
June 22, 2016, 06:03 |
bouyantpressure and fixedFluxPressure
|
#1 |
Member
Milad Setareh
Join Date: Oct 2012
Location: Tehran, Iran
Posts: 35
Rep Power: 13 |
Dear Guys
Could anyones explain the difference between bouyantpressure and fixedFluxPressure boundary conditions? Please explain with mathematical formula. Regards |
|
June 22, 2016, 09:12 |
|
#2 |
Senior Member
Join Date: Sep 2013
Posts: 353
Rep Power: 20 |
The best advice i can give is to learn the basics of the code language. Which is difficult because there nearly no documentation but it is quite straightforward:
bouyantpressure Code:
// If the variable name is "p_rgh", "ph_rgh" or "pd" // assume it is p? - rho*g.h and set the gradient appropriately. // Otherwise assume the variable is the static pressure. if ( dimensionedInternalField().name() == "p_rgh" || dimensionedInternalField().name() == "ph_rgh" || dimensionedInternalField().name() == "pd" ) { gradient() = -rho.snGrad()*(g.value() & patch().Cf()); } else { gradient() = rho*(g.value() & patch().nf()); } || is c++ lingo for "or" gradient is always the surface normal gradient of the field your boundary condition is applied for rho.snGrad is the surface normal gradient of the density field. "&" is the scalar product and Cf is the face center vector nf is the face normal vector. Hence the gradient in normal direction equals rho*g or n*grad(rho)*g fixedFluxPressure Code:
gradient() = (phiHbyAp - phip)/patch().magSf()/(*DppPtr); Not quite what you might be looking for but it should get you started. |
|
June 22, 2016, 11:44 |
|
#3 |
Member
Mona
Join Date: Mar 2016
Location: Berlin
Posts: 49
Rep Power: 10 |
you can also check out this thread:
http://www.cfd-online.com/Forums/ope...tml#post514589 |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
solver for evaporation/condensation modeling | gaza | OpenFOAM Programming & Development | 33 | February 11, 2021 10:19 |