|
[Sponsors] |
August 13, 2024, 09:32 |
p and p_rgh in simple algorithm
|
#1 |
Member
Kim jeamin
Join Date: Jul 2023
Posts: 36
Rep Power: 3 |
Hi, everyone.
I am new to openfoam and I am not sure the BCs that I set are right or not. Should BCs in p_rgh file be the same as BCs in p file? Or Is it okay to consider them independently? |
|
August 13, 2024, 10:13 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,169
Rep Power: 27 |
Hello Kim,
For solvers using p_rgh, your BCs have to be defined in p_rgh. p BCs would be usually set to calculated. In such situation, have a look to the tutorials corresponding to the solver you want to use to see how the BCs are defined. Yann |
|
August 13, 2024, 20:17 |
|
#3 | |
Member
Kim jeamin
Join Date: Jul 2023
Posts: 36
Rep Power: 3 |
Quote:
Thank you for your reply. I set BCs as you advised. But, I am not sure if my BCs are valid. It seems there is not any problem during iterations. Does it mean they are valid? My BCs in p and p_rgh file are as follows : BCs in p file Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { /* the tutorials : floor { type calculated; value $internalField; } ceiling { type calculated; value $internalField; } fixedWalls { type calculated; value $internalField; } */ inlet1 { type zeroGradient; } inlet2 { type zeroGradient; } outlet { type fixedValue; value uniform 0; } airconditioner { type zeroGradient; } wall1 { type zeroGradient; } } // ************************************************************************* // BCs in p_rgh file Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { /* the tutorials : floor { type fixedFluxPressure; rho rhok; value uniform 0; } ceiling { type fixedFluxPressure; rho rhok; value uniform 0; } fixedWalls { type fixedFluxPressure; rho rhok; value uniform 0; } */ inlet1 { type zeroGradient; rho rhok; } inlet2 { type zeroGradient; rho rhok; } outlet { type fixedValue; rho rhok; value uniform 0; } airconditioner { type zeroGradient; rho rhok; } wall1 { type zeroGradient; rho rhok; } } // ************************************************************************* // |
||
August 15, 2024, 05:55 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,169
Rep Power: 27 |
Hello Kim,
The fact your case is able to run does not necessarily mean your setup is physically correct (OpenFOAM will crash or throw an error only if something in your setup is preventing it to solve the equations) I see you copied and commented some BCs coming from tutorials, but you didn't use these BCs on the actual patches you have in your case. In p_rgh, your patches defined as zeroGradient should use fixedFluxPressure instead (as it is done in the tutorials) and in p your BCs should be defined as calculated. Regards, Yann |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|