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

How is space conservation law implemented in OpenFoam?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2016, 08:26
Default How is space conservation law implemented in OpenFoam?
  #1
New Member
 
Ajit Kumar
Join Date: Aug 2013
Location: Shiv Nadar University, India
Posts: 6
Rep Power: 13
ajitkumar22 is on a distinguished road
Hi,

If we read any article on dynamicMesh handling on OpenFoam, we come across space conservation law. For example: see Eq. 2 in http://www.enu.kz/repository/2009/AIAA-2009-341.pdf.

I understand how Space Conservation Law can be theoretically incorporated in the momentum equations. I just can't find where in OpenFoam this law has been implemented.

The furthest I have reached to that space conservation law has something to do with makeRelative(phi, U) and makeAbsolute(phi,U).

I am looking for how makeRelative(phi,U) incorporates mesh motion.

Any help will be appreciated.

Ajit
ajitkumar22 is offline   Reply With Quote

Old   May 4, 2016, 22:17
Default
  #2
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
Hi Ajit,

Make relative and make absolute simply add or subtract the mesh face fluxes (i.e. swept volume flux) from the volumetric flux.

This mesh face flux is calculated something like this (I'm going from memory):

1. Take a face, displace it to some other position in space.
2. Triangulate the face as it stands pre-motion and post motion. now you have two faces, each triangulated into more triangle faces.
3. For each triangle, create a prism by connecting the triangle before motion and after motion.
4. Calculate the volume of that prism.
5. Sum up all prisms for a face to get the volume swept by the face.

I hope that helps! I think you can find some more info from some of the work of Frank Boss.

Cheers,
Kyle
kmooney is offline   Reply With Quote

Old   May 5, 2016, 04:33
Default
  #3
New Member
 
Ajit Kumar
Join Date: Aug 2013
Location: Shiv Nadar University, India
Posts: 6
Rep Power: 13
ajitkumar22 is on a distinguished road
Thanks Kyle.

I understand the steps you mentioned. Actually I was looking for the piece of code in OpenFoam which implements these steps. I believe meshPhi does that job.

Best,
Ajit
ajitkumar22 is offline   Reply With Quote

Old   May 5, 2016, 04:42
Default
  #4
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 18
kmooney is on a distinguished road
Hi Ajit,

Here is where it calls the swept vol for each face (line 330):
https://github.com/OpenFOAM/OpenFOAM...rimitiveMesh.C

Here is where the faces are decomposed and swept vol calculated (line 608):
https://github.com/OpenFOAM/OpenFOAM...es/face/face.C
kmooney is offline   Reply With Quote

Old   May 5, 2016, 06:21
Default
  #5
New Member
 
Ajit Kumar
Join Date: Aug 2013
Location: Shiv Nadar University, India
Posts: 6
Rep Power: 13
ajitkumar22 is on a distinguished road
Thanks Kyle. I believe this is exactly what I was looking for.

Appreciate your help.
ajitkumar22 is offline   Reply With Quote

Reply

Tags
makeabsolute, makerelative, space conservation law


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
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 07:55
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 07:25
Test for geometric (space) conservation law(GCL) zonexo Main CFD Forum 0 April 17, 2006 12:05
Fatal error error writing to tmp No space left on device maka OpenFOAM Installation 2 April 3, 2006 09:48
space conservation law Dorain Siemens 1 February 22, 2005 09:11


All times are GMT -4. The time now is 00:58.