CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Integral Equation to Foam Equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 25, 2011, 15:32
Default Integral Equation to Foam Equation
  #1
New Member
 
Thilo Michels
Join Date: Oct 2011
Posts: 11
Rep Power: 15
Thilo is on a distinguished road
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:

\frac{\partial}{\partial t}\int f_i d V + \int{f_i \vec U \vec n}dA+\rho\int{U_i \vec U \vec n}dA +\int{p \vec e\cdot \vec n}dA

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)
+ fvc::grad(aP)
);

Thank you very much in advanced,

Thilo

Last edited by Thilo; November 23, 2011 at 05:06. Reason: Equation in latex form
Thilo is offline   Reply With Quote

Old   November 22, 2011, 19:01
Default
  #2
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
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

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

see link above for more explanation
chegdan is offline   Reply With Quote

Old   November 24, 2011, 04:17
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
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
Cyp is offline   Reply With Quote

Old   November 24, 2011, 05:53
Default
  #4
New Member
 
Thilo Michels
Join Date: Oct 2011
Posts: 11
Rep Power: 15
Thilo is on a distinguished road
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
Thilo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 15:11
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00
[Gmsh] Import gmsh msh to Foam adorean OpenFOAM Meshing & Mesh Conversion 24 April 27, 2005 09:19


All times are GMT -4. The time now is 04:29.