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

A way to modelling p0 T0 BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2012, 18:02
Default A way to modelling p0 T0 BC
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
imagine we have very very huge reservoir that connects to a pipe and we want to analyze the flow in it.we know p and T at the reservoir and don't want to waste our valuable time to investigate flow at reservoir to find the velocity at outlet of it.on the other hand this reservoir is very huge and takes a lot of time analyzing it that even is useless for us because we want grasp only flow in the pipe.
Now the question is how we can set the boundary conditions at the inlet of the pipe that could precisely model what occurs in real world.
Your responce's and suggestions are appreciated.
immortality is offline   Reply With Quote

Old   December 6, 2012, 19:53
Default
  #2
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
The totalPressure and totalTemperature BC's are what you should be using.
mturcios777 is offline   Reply With Quote

Old   December 7, 2012, 04:10
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
oh,i forgot to tell that it should be modelled in groovybc because the real problem that have to model is changing from p0 T0 to another BC mean moving wall.then is it possible this situation without groovybc?or how to model in groovybc.
immortality is offline   Reply With Quote

Old   December 7, 2012, 04:41
Default
  #4
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
and what should be defined for velocity field with totalPressure and totalTemperature?
How can i know how these models work?
immortality is offline   Reply With Quote

Old   December 7, 2012, 09:27
Default
  #5
Senior Member
 
adambarfi's Avatar
 
Mostafa Mahmoudi
Join Date: Jan 2012
Posts: 322
Rep Power: 15
adambarfi is on a distinguished road
Send a message via Yahoo to adambarfi Send a message via Skype™ to adambarfi
Why you don't apply fixedValue for velocity at inlet? it's known from your post that fixed velocity can be appropriated for inlet.

Quote:
Originally Posted by immortality View Post
and what should be defined for velocity field with totalPressure and totalTemperature?
How can i know how these models work?
just go to 'scr\finiteVolume\fields\fvPatches\derived' and find the BC you want to use. In the .C file you can see the needed parameters.
adambarfi is offline   Reply With Quote

Old   December 7, 2012, 11:30
Default
  #6
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
because we don't know the velocity.we only know p0 and T0.
Its possible assign a guess for velocity but it will not be accurate this way.
if I set inletOutlet for velocity how value should I put for it?
I have examined several methods but OpenFOAM gives only float exception error.
for example I applied this BC for pressure,is there any error in it?

boundaryField
{
right
{
type zeroGradient;
}

left
{
type groovyBC;

variables (

//"pi=3.1415926535;"
"y_max=max(pos().y);"
"y_min=min(pos().y);"
"r=0.06;"
"rpm=3600;"
"omegav=rpm*pi/30;"
"vel_r=r*omegav;"
"tetha_1=11*pi/180;"
"tetha_2=60*pi/180;"
"tetha_3=90*pi/180;"
"time_1=tetha_1/omegav;"
"time_2=tetha_2/omegav;"
"time_3=tetha_3/omegav;"
"time_final=0.005;"
"pr_01=250000;"
"Tr_01=288;"
"pr_02=100000;"
"Tr_02=288;"
"gamma=1.4;"
"R_g=287.14;"

);

fractionExpression "((y_max-pos().y)/vel_r+time_2<time()&&time()<time_3)?1:0";

valueExpression "pr_02*pow((1+(gamma-1)/2*magsqr(internalField(U))/(gamma*R_g*internalField(T))),(-gamma/(gamma-1)))";
value uniform 100000;
gradientExpression "0";

//type fixedValue;
//value uniform 250000;
}
immortality is offline   Reply With Quote

Old   December 7, 2012, 12:02
Default
  #7
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
The totalPressure and totalTemperature BCs will adjust the static temperature and pressure based on flow characteristics so that the total pressure remains constant. You need entries for the velocity and flux fields, as well as what you are using to calculate density or compressibility. If you have a thermo model that outputs rho, use that; otherwise you need to specify either psi or gamma.
mturcios777 is offline   Reply With Quote

Old   December 7, 2012, 12:13
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
thank you.you mean what BC should I set for velocity then?(I don't know that)
and whats psi definition?
thanks.
immortality is offline   Reply With Quote

Old   December 7, 2012, 16:39
Default
  #9
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
You'll need to do some reading up on compressible gas models for the definition of psi, there is too much to go into through the forum.

As for U BCs, do you want to determine the flowrate from the resevoir? Will it be inflow or outflow. If you can answer these questions, you should be able to determine what BCs you should use.
mturcios777 is offline   Reply With Quote

Old   December 12, 2012, 06:53
Default
  #10
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
I can't understand the code defenitly.
how does it calculate p0 ?
if we dont define psi and only define rho a compressible formula is used?
immortality is offline   Reply With Quote

Old   December 12, 2012, 12:06
Default
  #11
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
The totalPressure and totalTemperature BCs have you specify if you want to calculate the total pressure/temperature by using rho, psi or by specifying the specific heat ratio. The static pressure/temperature on the boundary is adjusted so that the total pressure/temperature remains constant.
mturcios777 is offline   Reply With Quote

Old   December 14, 2012, 03:25
Default
  #12
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
could you tell me a hint so i understand what psi is?
immortality is offline   Reply With Quote

Old   December 14, 2012, 12:09
Default
  #13
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28
mturcios777 will become famous soon enough
Start here: http://en.wikipedia.org/wiki/Compressibility_factor
mturcios777 is offline   Reply With Quote

Old   June 24, 2013, 10:51
Default
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
Hi
I think its the time for describe some things:
psi is:1/(R*T) that R=R_u/M,M is molecular mass of the specified gas
I have a long explanations about how totalPressure and totalTemperature work that will put them here later if I remember or if someone needs,don't hesitate to notice me to explain.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality 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
error message cuteapathy CFX 14 March 20, 2012 06:45
Modelling unsteady 2D aerofoil drag xlxc34 Main CFD Forum 0 June 24, 2011 04:42
Advice on multi-phase flow modelling Martin Main CFD Forum 3 October 14, 2008 05:16
Unsteady modelling technique? Carlos FLUENT 0 September 26, 2008 11:37
how to ensure that your modelling is correct rvndr Main CFD Forum 7 March 1, 2004 12:21


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