CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Integral Equation to Foam Equation (https://www.cfd-online.com/Forums/openfoam-programming-development/93752-integral-equation-foam-equation.html)

 Thilo October 25, 2011 14:32

Integral Equation to Foam Equation

Hi Everyone,

can someone please tell me, if I have implemented my equation right? As this is my first task I implement into openFoam, I'm not sure wether there are errors in my code which is running so far, but crashes after some timesteps.

My Equation is:

with f: velocity times density
U: velocity
p: pressure

My OpenFoam code is:

fvVectorMatrix aFEeqn
(
fvm::ddt(aF)
+ fvm::div(ac_phi,aF)
+ rho * fvc::div(ac_phi_2,U)
);

Thank you very much in advanced,

Thilo

 chegdan November 22, 2011 19:01

You may have answered this already, but to make your question a little clearer...why not write it using latex (http://www.cfd-online.com/Forums/sit...ne-forums.html).

Code:

 \oint_{S} \vec{U}\vec{U}\cdot \hat{n}dA
produces

see link above for more explanation

 Cyp November 24, 2011 04:17

What about the pressure equation ?

Indeed, your equation depends on the pressure field. Consequently the pressure must be evaluated elsewhere.

The classical method is to use SIMPLE or PISO algorithms.. (cf simpleFoam or pisoFoam or icoFoam)

regards,
Cyp

 Thilo November 24, 2011 05:53

Hi Cyp,

thanks for this advice. Indeed there is a pressure and a density equation, which I didn't mention. I was not shure, if I implemented the mentioned equation right and I didn't want to ask for to much help.

Meanwile I solved my problem!

With kind regards,

Thilo

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