|
[Sponsors] |
April 24, 2016, 10:23 |
Problems about setReference() and solve PPE
|
#1 |
New Member
Zhanchao Hu
Join Date: Apr 2016
Posts: 8
Rep Power: 10 |
Hi everyone,
I am now solving a Rayleigh-Bernard problem by my own solver (SIMPLER). The boundary condition for dynamic pressure is zeroGradient. But the difficulty in solving Pressure Poisson Eqaution(PPE) hindered me for a long time. 1. I have tried to use setReference(). The solution is converged quickly. But it is obvious the reference point has a bad influence on the solution. The solution changes drastically as the reference point changes. I can't figure out the reason. Could any one tell me the skills in set reference pressure to make the solution accurate? 2. The other method I want to implement is to change continuity equation as: By doing this, the PPE is more diagonally dominant. And when the solution of PPE converged, , the continuity equation become the right one. This can be called an equivalent artificial compressibility method. But I don't know how this method can be implemented in Openfoam. Becasue it requires to change the RHS of PPE during the solve() process (the fvc::ddt(1/beta,p) should be changed after each iteration). Could any one tells me how can I realize this method in OpenFOAM? Do I have to rewrite solve() function? Any suggestions will be appreciated. Zhanchao Last edited by chaochaoyoyo; April 25, 2016 at 01:21. |
|
April 24, 2016, 13:30 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hello,
I am not so familiar with your method (reference would be nice). If you want to change the pressure equation, just do it: Code:
fvScalarMatrix pEqn ( fvm::div(phid, p) - fvm::laplacian(rho*rAU, p) == fvOptions(psi, p, rho.name()) );
__________________
Keep foaming, Tobias Holzmann |
|
April 24, 2016, 21:55 |
|
#3 | |
New Member
Zhanchao Hu
Join Date: Apr 2016
Posts: 8
Rep Power: 10 |
Quote:
What you suggest is very helpful. Thank you. I am reading some materials about fvOptions(). Do you know whether or not the fvOptions() function modify the source term during pEqn.solve() process? If it does, this is what I am looking for! Best regards, Zhanchao |
||
April 25, 2016, 02:47 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hello,
the function solve() only solves your matrix that you build before. The matrix you want to solve is that one Code:
fvScalarMatrix pEqn ( );
__________________
Keep foaming, Tobias Holzmann |
|
|
|