CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   frictional pressure drop in rhoPisoFoam (using fanning friction factor) (https://www.cfd-online.com/Forums/openfoam-solving/204279-frictional-pressure-drop-rhopisofoam-using-fanning-friction-factor.html)

ashish.svm July 18, 2018 21:09

frictional pressure drop in rhoPisoFoam (using fanning friction factor)
 
I want to include frictional pressure drop calculation in rhoPisoFoam.

frictional pressure drop can be calculated by 0.5*ff*rho*U^2
where ff is fanning friction factor, which can be calculated by using standard correlations based on reynolds number.

I have modified UEqn as following.
Code:

fvVectorMatrix UEqn
(
    fvm::ddt(rho, U)
  + fvm::div(phi, U)
);

if(includeFrictionFactor)
{
  UEqn += fvm::div(phiFrictional, U);
}

phiFrictional is calculated as following.
Code:

phiFrictional =
    fvc::interpolate(fanningFrictionFactor)*
    (
        (fvc::interpolate(U) & mesh.Sf())
      + fvc::ddtPhiCorr(rUA, rho, U, phiFrictional)
    );

and added the following term in pressure equation
Code:

if(includeFrictionFactor)
    {
      pEqn += fvc::div(phiFrictional);
    }

but using this formulation leads to incorrect results.

Please let me know what is wrong in my formulation.

Or

Please suggest me some other solver which has the pressure drop calculation using fanning friction factor.

Santiago July 19, 2018 06:22

Quote:

Originally Posted by ashish.svm (Post 699739)
I want to include frictional pressure drop calculation in rhoPisoFoam.

frictional pressure drop can be calculated by 0.5*ff*rho*U^2
where ff is fanning friction factor, which can be calculated by using standard correlations based on reynolds number.

I have modified UEqn as following.
Code:

fvVectorMatrix UEqn
(
    fvm::ddt(rho, U)
  + fvm::div(phi, U)
);

if(includeFrictionFactor)
{
  UEqn += fvm::div(phiFrictional, U);
}

phiFrictional is calculated as following.
Code:

phiFrictional =
    fvc::interpolate(fanningFrictionFactor)*
    (
        (fvc::interpolate(U) & mesh.Sf())
      + fvc::ddtPhiCorr(rUA, rho, U, phiFrictional)
    );

and added the following term in pressure equation
Code:

if(includeFrictionFactor)
    {
      pEqn += fvc::div(phiFrictional);
    }

but using this formulation leads to incorrect results.

Please let me know what is wrong in my formulation.

Or

Please suggest me some other solver which has the pressure drop calculation using fanning friction factor.

Its wrong, the velocity in your formula is the square of the magnitude of the velocity, or inner product. Besides, why you take the divergence of such force?

ashish.svm July 19, 2018 11:28

Quote:

Originally Posted by Santiago (Post 699785)
Its wrong, the velocity in your formula is the square of the magnitude of the velocity, or inner product. Besides, why you take the divergence of such force?

Sorry, my understanding of the friction factor was wrong. I found out that this force is applied to the wetted surface.

But I am unable to understand how to modify the momentum equation to include fanning friction term.


All times are GMT -4. The time now is 14:31.