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

pEqn and mixture density in cavitatingFoam and cavitatingDyMFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2020, 07:49
Post pEqn and mixture density in cavitatingFoam and cavitatingDyMFoam
  #1
New Member
 
peyman havaej
Join Date: Jan 2016
Posts: 16
Rep Power: 10
peyman.havaej is on a distinguished road
Dear All

I use the cavitating flow solver in the OpenFOAM. The cavitatingFoam solver employes a Homogeneous Equilibrium Model (HEM), in which the pressure equation depends on the compressibility of each phase and the density of the mixture is calculated according to an equilibrium barotropic equation.
In the OpenFOAM v-6, there are minor differences in the pressure and density equation between cavitatingFoam and cavitatingDyMFoam (mesh motion).
For example, in pEqn:
cavitatingFoam:

Code:
fvScalarMatrix pEqn
        (
            fvm::ddt(psi, p)
          - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(alphav) - pSat*fvc::ddt(psi)
          + fvc::div(phi, rho)
          + fvc::div(phiGradp)
          - fvm::laplacian(rhorAUf, p)
        );
cavitatingDyMFoam:

Code:
fvScalarMatrix pEqn
        (
            fvc::ddt(rho)
          + psi*correction(fvm::ddt(p))
          + fvc::div(phi, rho)
          + fvc::div(phiGradp)
          - fvm::laplacian(rhorAUf, p)
        );
for the density of mixture:
cavitatingFoam:

Code:
 rho == max
    (
        psi*p
      + alphal*rhol0
      + ((alphav*psiv + alphal*psil) - psi)*pSat,
        rhoMin
    );
cavitatingDyMFoam:

Code:
    volScalarField rho0(rho - psi*p);
...
...
...
    rho == max(rho0 + psi*p, rhoMin);
While I can understand the implementation of both solvers, I think pEqn and density correction in the static and Dynamic mesh solvers are not the same.

For clarification,
Code:
psi*correction(fvm::ddt(p))
is not equal to the
Code:
 fvm::ddt(psi, p)
Moreover, the density correction obviously is not the same. Please correct me if I am wrong.

Do you know what is the main reason behind this difference in the implementation of cavitatingFoam and cavitatingDyMFoam?

Thanks.
Whit Kind Regards,
Peyman
peyman.havaej is offline   Reply With Quote

Old   July 7, 2022, 00:34
Wink a question about the phiGradp
  #2
New Member
 
Join Date: Jul 2022
Posts: 5
Rep Power: 4
Yang16024 is on a distinguished road
Hi, peyman

I am studying the cavitatingFoam solver. But I have a question with this pEqn.
It would be very much appreciated if you can tell me the meaning of term phiGradp in the pEqn and why this term is in the pEqn?
Thank you very much.
Yang16024 is offline   Reply With Quote

Reply

Tags
barotropic, cavitatingdymfoam, cavitatingfoam, multiphase, openfoam


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



All times are GMT -4. The time now is 12:54.