CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   SIMPLE for viscous NavierStokes (http://www.cfd-online.com/Forums/openfoam-solving/60288-simple-viscous-navierstokes.html)

 almanstoetter July 11, 2005 12:44

I have modified the UEqn.H and

I have modified the UEqn.H and hEqn.h in buoyantSimpleFoam to represent steady laminar viscous Navier-Stokes:

tmp<fvvectormatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi),U)
- fvm::laplacian(2*mu+lambda, U)
);

UEqn().relax();

solve
(
UEqn() ==
fvc::div
(
)
);

fvScalarMatrix hEqn
(
fvm::div(phi,h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(k/Cp, h)
);

hEqn.relax();

solve
(
hEqn ==
fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p))
- p*fvc::div(phi/fvc::interpolate(rho))

Do UEqn.H() and UEqn.A() in pEqn.H still give the required diagonal and off-diagonal entries ? Has the field phi to be extended to use the SIMPLE algorithm in pEqn.H ?

Juergen

 henry July 11, 2005 13:15

UEqn.H() will not be correct a

UEqn.H() will not be correct as you have currently formulated UEqn. You need to move the fvc::div term from the UEqn solve statement to the UEqn construction:

tmp<fvvectormatrix> UEqn
(
fvm::div(phi, U)
- fvm::Sp(fvc::div(phi),U)
- fvm::laplacian(2*mu+lambda, U)
- fvc::div
(
)
);

UEqn().relax();

solve
(
);

 liugx212 March 10, 2006 00:23

Hi friends, I also want to

Hi friends,

I also want to use the buoyantFoam case to simulate the sequestration. It means that I need add the Darcy term and source term in solver. But I am not sure what do I do. Could you please give some advice?