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

Inlet pressure condition varying in time

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By kebsiali

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2015, 19:48
Default Inlet pressure condition varying in time
  #1
Member
 
alvaro
Join Date: Apr 2015
Posts: 33
Rep Power: 11
alvariten is on a distinguished road
Hi all,

I'm trying to set a inlet pressure from a data curve of pressure and time. I use the OpenFoam v2.3.0 and I have seen the patch timeVaryingMappedFixedValueFvPatchField, but what little I understand about this patch is that it is necessary to create a folder for each time step within " constatn/boundaryData/inlet " and set the pressure value inside each time folder. Please, correct me if I'm wrong, I'm new in OpenFoam.

The point is I would like to know if there is the possibility to make that the pressure values are being read from a text file for example.

Regards.
alvariten is offline   Reply With Quote

Old   May 27, 2015, 04:37
Default
  #2
Member
 
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14
kebsiali is on a distinguished road
Try to look at the T-junction tutorial
https://github.com/OpenCFD/OpenFOAM-...oam/t-junction

what they did is write the following in 0/p

inlet
{
//type totalPressure;
//p0 uniform 100040;
type timeVaryingTotalPressure;
p0 100040; // only used for restarts
outOfBounds clamp;

fileName "$FOAM_CASE/constant/p0vsTime";
U U;
phi phi;
rho none;
psi none;
gamma 1;
value uniform 100040;
}


and then create a file constant/p0vsTime which contains a table or list of the time vs pressure as following

(
( 0 100010)
( 1 100040)
)



now just like this you can make your file in the same listing way
and then put its path in 0/p
alvariten likes this.
kebsiali is offline   Reply With Quote

Old   May 27, 2015, 08:11
Default
  #3
Member
 
alvaro
Join Date: Apr 2015
Posts: 33
Rep Power: 11
alvariten is on a distinguished road
Hi Ali,

I didn't know that tutorial and I think it's what I'm looking for.

Thank you so much!
alvariten is offline   Reply With Quote

Old   May 27, 2015, 09:34
Default
  #4
Member
 
alvaro
Join Date: Apr 2015
Posts: 33
Rep Power: 11
alvariten is on a distinguished road
Hi,
I forgot it... I'm using OpenFoam v2.3.0 and the patch "timeVaryingUniformTotalPressure" is not in this version, it's in v1.7 only I think.
Could I implement this patch in my OF version in easy way?
Regards.
alvariten 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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
dynamic Mesh is faster than MRF???? sharonyue OpenFOAM Running, Solving & CFD 14 August 26, 2013 08:47
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34
time varying vector boundary condition using patch normal mpeti OpenFOAM Running, Solving & CFD 8 June 21, 2012 12:50
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56


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