CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Why sonicFoam solver needs magU boundary/initial condition in /0 folder?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By dviam

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 30, 2018, 19:18
Default Why sonicFoam solver needs magU boundary/initial condition in /0 folder?
  #1
Member
 
Foad
Join Date: Aug 2017
Posts: 58
Rep Power: 8
foadsf is on a distinguished road
I'm looking into Ankush Gupta thesis:

Quote:
Shock Tube with rhoCentralFoam, sonicFoam, Lax-Friedrichs and MacCormacks
and there it has been mentioned that unlike rhoCentralFoam solver, sonicFoam requires the magU file. meanwhile in this post it has been mentioned that you need magU for both solvers. i was not able to find any examples in my own OpenFOAM installation 5.x folder including a magU file but here I found it on the github repo for the older version. My questions:


  • What is this file?
  • what is the difference with U boundary/initial condition file?
  • in what cases you must have it?
  • why it is required for sonicFoam but not the rhoCentralFoam solver?
  • non-relevant but what does it have to do with foamCalc? it just comes up in many search results!
foadsf is offline   Reply With Quote

Old   February 1, 2018, 13:16
Default foamCalc replaced by postProcess
  #2
New Member
 
Join Date: Jul 2017
Posts: 4
Rep Power: 8
dviam is on a distinguished road
Hi Foad,

For starters, to my knowledge, the magU file is not "a required" file in any of the solvers you mentioned. It is a result of postProcessing. In older versions of OpenFOAM there was a tool known as foamCalc which allowed users to extract relevant information from their simulations through the command line. One such pieces of information would be the magnitude of velocity at various boundaries or in the internal field. In newer versions of openFOAM, which you seem to be using, a lot of the tools used in post processing have been consolidated into the postProces utility.

If you type postProcess -help you will be able to see a summary of it's uses. In order to calculate the magnitude of velocity at all time-steps, one now needs to type:

Code:
postProcess -func "mag(U)"
This will create the magU file in each of the time directories. It will be a list of velocity magnitudes at all grid points in the internal field and at the boundaries of the domain.

Hope this helps.

- Dorien
foadsf likes this.
dviam 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
Snippet for redefining fixedGradient boundary condition for a patch inside solver babakflame OpenFOAM Programming & Development 47 April 9, 2018 13:19
boundary condition for high order Possion solver jen Main CFD Forum 0 November 16, 2005 19:04
boundary condition for high order possion solver *NM* jen Main CFD Forum 0 November 16, 2005 19:02
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32
Setting a B.C using UserFortran in 4.3 tokai CFX 10 July 17, 2001 16:25


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