|
[Sponsors] |
September 7, 2017, 09:49 |
A question on pEqn.C of CavitatingFOAM
|
#1 |
New Member
Byoung Guk Kim
Join Date: Jul 2017
Posts: 4
Rep Power: 8 |
Hi,
While I am validating the cavitatingFOAM to solve acoustic cavitation under an ultrasonic cavitation device, I have a question on the source code of pEqn.C. I understand it tries to solve pEqn using variables in the previous time step and update the variables accordingly. So I expect the red marked statement should be rho = max ( ... ) instead of '=='. If anybody can tell me if this is correct, before I really change it, it will be so thankful. BG ---------------(quote begins)------------------- while (pimple.correctNonOrthogonal()) { fvScalarMatrix pEqn ( ... ); pEqn.solve(mesh.solver(p.select(pimple.finalInnerI ter()))); if (pimple.finalNonOrthogonalIter()) { phi += (phiGradp + pEqn.flux())/rhof; } } Info<< "Predicted p max-min : " << max(p).value() << " " << min(p).value() << endl; rho == max ( psi*p + alphal*rhol0 + ((alphav*psiv + alphal*psil) - psi)*pSat, rhoMin ); #include "alphavPsi.H" p = ( rho - alphal*rhol0 - ((alphav*psiv + alphal*psil) - psi)*pSat )/psi; p.correctBoundaryConditions(); -------------(quote ends)----------------------------- |
|
September 8, 2017, 05:49 |
Question answered by another thread similar as this.
|
#2 |
New Member
Byoung Guk Kim
Join Date: Jul 2017
Posts: 4
Rep Power: 8 |
I found the operator '==' overrides C/C++ standard operator in another search. The operator is redefined in fvMatrix.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error in running cavitatingFoam | Antonio40 | OpenFOAM Running, Solving & CFD | 2 | February 9, 2015 14:12 |
small question about the functionalities of topological changes in OpenFoam | ngj | OpenFOAM Running, Solving & CFD | 2 | February 28, 2013 10:02 |
Question Re Engineering Data Source | imnull | ANSYS | 0 | March 5, 2012 13:51 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 15:26 |
Poisson Solver question | Suresh | Main CFD Forum | 3 | August 12, 2005 04:37 |