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:
volTensorField gradU = fvc::grad(U); 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 ( mu*gradU.T()+lambda*I*tr(gradU)-(mu+lambda)*gradU ) - fvc::grad(pd) + fvc::grad(rho)*gh ); 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)) + ((lambda*I*tr(gradU)+mu*(gradU+gradU.T())) && gradU) 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 |
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 ( mu*gradU.T()+lambda*I*tr(gradU)-(mu+lambda)*gradU ) ); UEqn().relax(); solve ( UEqn() == - fvc::grad(pd) + fvc::grad(rho)*gh ); |
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? Thanks advance. Guoxiang |
All times are GMT -4. The time now is 12:43. |