CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

A question on pEqn.C of CavitatingFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2017, 09:49
Default A question on pEqn.C of CavitatingFOAM
  #1
New Member
 
Byoung Guk Kim
Join Date: Jul 2017
Posts: 4
Rep Power: 8
nathan.kim is on a distinguished road
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)-----------------------------
nathan.kim is offline   Reply With Quote

Old   September 8, 2017, 05:49
Default Question answered by another thread similar as this.
  #2
New Member
 
Byoung Guk Kim
Join Date: Jul 2017
Posts: 4
Rep Power: 8
nathan.kim is on a distinguished road
I found the operator '==' overrides C/C++ standard operator in another search. The operator is redefined in fvMatrix.
nathan.kim is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 17:59.