CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to add bodyforce in momentum equation in viscoelasticFluidFoam? (http://www.cfd-online.com/Forums/openfoam-solving/115925-how-add-bodyforce-momentum-equation-viscoelasticfluidfoam.html)

 arshoon April 9, 2013 11:03

How to add bodyforce in momentum equation in viscoelasticFluidFoam?

Hi,everybody...

viscoelastic fluid in OpenFoam. The main function includes two decoupling equation: viscoelastic stress

equation and momentum equation, and I make a little change to momentum equation to add bodyforce to drive

the fluid. The equations are listed as follows:
-------------------------------------------------------
tmp<fvVectorMatrix> UEqn
(
fvm::ddt(U)
+ fvm::div(phi, U)
+ fvc::laplacian(kappa/rho, U)
- fvm::laplacian((nus+kappa)/rho, U)
- fvc::div(sigmap/rho)
==
bodyforce
);
UEqn().relax();
--------------------------------------------------------
2.TEqn(viscolastic equation):
tmp<fvTensorMatrix> TEqn
(
fvm::ddt(sigmap)
+ fvm::div(phi,sigmap)
==
- (fvm::Sp(epsilon/nup*tr(sigmap), sigmap) + fvm::Sp(1/lambda1,sigmap))

);
// TEqn().relax();
solve(TEqn);
----------------------------------------------------------
I start from 2D poiseuille flow,Initial U is set to zero, and the inlet and outlet of the tube are defined

as cyclic boundary.
I carried out two simulations with the same physic parameters but different mesh sizes, one is 100by50, the

other is 200by100, then I output the velocity profile in paraview.
To my huge surprise the maximum velocity differed a lot(U1:0.0052, U2:0.0093), and It seemed to be

impossible to be explained as space error...This problem bothered me a lot!!
I really wonder why??? Can anybody give me some advices?? Thanks very much!!

 All times are GMT -4. The time now is 21:34.