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

Change P-rgh to Pfor interFoam

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 1, 2013, 22:41
Default Change P-rgh to Pfor interFoam
  #1
Member
 
vishal
Join Date: Mar 2013
Posts: 50
Rep Power: 3
vishal_s is on a distinguished road
I am working on a multiphase flow. I have P value but in interfoam P_rgh is given. How to change P-rgh to P in the solver???
vishal_s is offline   Reply With Quote

Old   December 2, 2013, 06:50
Default
  #2
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg (Bavaria, Germany) Leoben (Styria, Austria)
Posts: 845
Rep Power: 17
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,

in your solver both variables exists.
Can you describe your Problem in a other way?

Do you want to set up "p" instead of "p_rgh"?

Code:
p_rgh = p - rho*gh;
p = p_rgh + rho*gh;
 
    volScalarField p
    (
        IOobject
        (
            "p",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        p_rgh + rho*gh
    );
Tobi is offline   Reply With Quote

Old   December 2, 2013, 06:55
Default
  #3
Member
 
vishal
Join Date: Mar 2013
Posts: 50
Rep Power: 3
vishal_s is on a distinguished road
Tobi, I am working on an external nozzle flow problem. In this case, the inlet pressure to the nozzle is know to me and the outlet is atmosphere.

Now in interFoam, we have p_rgh instead of P. Now If I am not wrong, P_rgh is the local dynamic pressure. SO how to set P in this case. If my inlet P is 4e6 what will be my p_rgh???
vishal_s is offline   Reply With Quote

Old   December 2, 2013, 22:51
Default
  #4
Member
 
vishal
Join Date: Mar 2013
Posts: 50
Rep Power: 3
vishal_s is on a distinguished road
yes Tobi, I want to set P. Can you tell me how to do it????
vishal_s is offline   Reply With Quote

Old   December 3, 2013, 06:16
Default
  #5
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg (Bavaria, Germany) Leoben (Styria, Austria)
Posts: 845
Rep Power: 17
Tobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
As you can see in the code above the p-file is not read while starting the solver but will be automatically generated every time step you save.

For your Problem the easiest way would be the following:

- calculate p_rgh at the inlet and set it to fixedValue so that you reach p

As shown you can do this with:
Code:
 
p_rgh = p - rho * gh
1. you know p
2. you know rho
3. you know g
4. you should know h
Tobi is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thermal phase change model Piti CFX 0 February 9, 2009 09:27
Model foaming process: change the volume / density pmp77 CFX 0 November 18, 2008 09:53
How to change contour line thickness? Mishar CD-adapco 0 December 15, 2004 10:28
How to change the reference pressure value to 0 Pa Lee CD-adapco 2 July 1, 2003 00:32
help needed about phase change Yanhu Guo Main CFD Forum 4 January 23, 2001 23:16


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