CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   IcoFoam Is it a NavierStokesEquation (https://www.cfd-online.com/Forums/openfoam/60735-icofoam-navierstokesequation.html)

joern September 10, 2008 07:24

Hi, I try to analyse the ic
 
Hi,

I try to analyse the icoFoam Solver.
The Solver solves the Equation:
ddt(U)+div(phi,U)-Laplacian(nu,U)=-grad(p)

this themes seems to be a Navier-Stokes-Equation but I miss an U at div(phi,U).
The Navier-Stokes Equation I know sould be:
ddt(U)+U*div(phi,U)-Laplacian(nu,U)=-grad(p)

Does the U appear later in the discretisation or is it a variation of the Navier-Stokes-Equation?

Thx,
Jörn

grtabor September 10, 2008 09:33

No: the N-S equation that _you
 
No: the N-S equation that _you_ know is

ddt(U)+U*div(U)-Laplacian(nu,U)=-grad(p)

Since div(u)=0 we can rearrange this as

ddt(U)+div(U*U)-Laplacian(nu,U)=-grad(p)

The finite volume discretisation however linearises this by representing one of the U terms in div(U*U) as the flux phi, hence

ddt(U)+div(phi,U)-Laplacian(nu,U)=-grad(p)

We then need to iterate around a bit to take account of the fact that when U changes from this solution, phi must be updated...

Clear now?

Gavin

joern September 10, 2008 09:52

Thanks for the fast help. Thi
 
Thanks for the fast help.
This helps a lot.

I didn't see the step:
ddt(U)+U*div(U)-Laplacian(nu,U)=-grad(p)
to
ddt(U)+div(U*U)-Laplacian(nu,U)=-grad(p)

Joern

ngj September 10, 2008 10:24

Here it is, with subscript x,y
 
Here it is, with subscript x,y,z meaning differentiation and u,v,w being velocity components and U the vector:

In the x-direction div(U * U) reads:

(u * u)_x + (u * v)_y + (u * w)_z =
u_x u + u u_x + u_x u + u v_y + u_z w + u w_z =
u_x u + u_x u + u_z w + u*(u_x + v_y + w_z) =
u_x u + u_x u + u_z w

where the term in the bracket are identical to zero for incompressible flows, as it is your continuity equation.

The same can be done for the other directions and you will have understood the step above.

Best regards,

Niels

joern September 10, 2008 11:29

Thx for your Help. I think
 
Thx for your Help.

I think I now understand the solver algorithm. Now I have to understand the discretisation ;)

Joern

joern November 26, 2008 18:26

Hallo, i have a new problem
 
Hallo,

i have a new problem with the same topic http://www.cfd-online.com/OpenFOAM_D...part/happy.gif

I try to understand the sover sonicFoam.
This solver solves the Equations:
ddt(rho, U)+div(phi, U)-laplacian(mu, U)=-grad(p)
and
ddt(rho, e)+div(phi, e)-laplacian(mu, e)=-div(phi/rho)+mu*magSqr(symm(grad(U)))

For me it looks like some kind of impulse and energy equation from the compressible Navier Stokes equations.

Does someone know which equations sonicFoam solves or where i can find some literature about the algorithm an his mathematic roots?


sorry for posting nearly the same question again, but i need the infos for my further work and i don't see it alone.

thx,
Joern

mark_michael November 27, 2008 18:43

sonicfoam is a solver for comp
 
sonicfoam is a solver for compressible ideal gas flow. That why the solver use the continuity-,momentum-, energy-, and ideal gas equation in its algorithm.
look in the programmer's guide ! there is an nice tutorial named: "Supersonic flow over a forward-facing step" on page 58 !
http://foam.sourceforge.net/doc/Guid...mmersGuide.pdf

joern June 15, 2009 14:44

I reactivate this old thread, cause i have a question about the sonicFoam solver.

sonicFoam is a solver with PISO loop for the compressible Navier-Stokes equations. I think i understand most of the solver but one think is not clear:

if i set mu=0 in sonicFoam it solves the Euler Equations for a compressible, inviscid, perfect gas. (thats what i want to simulate)
But there is a little difference. sonicFoam just looks at the inner energy e=T*Cv (just thermal energy). The Euler Equations (and also the Navier-Stokes) work with the energy e=T*Cv+1/2*mag(v)^2 (thermal energy + kinetic energy).

why can the kinetic energy be ignored? And why is the the solver still consisten to the Euler-/Navier-Stokes Equations?


thx for help,
Joern


All times are GMT -4. The time now is 06:53.