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

TimeVaryingUniformFixedValue with sonicLiquidFoam Bugs amp Fixes

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2008, 08:49
Default when set a pressure boundary a
  #1
New Member
 
Martin/Run DU
Join Date: Mar 2009
Location: Hong Kong
Posts: 25
Rep Power: 17
chnrdu is on a distinguished road
Send a message via Skype™ to chnrdu
when set a pressure boundary as

F1
{
type timeVaryingUniformFixedValue;
timeDataFileName "inlet.dat";
value uniform 1e+5;
}

When I run sonicLiquidFoam, I got errors:

--> FOAM FATAL IO ERROR : file "" does not exist

file: at line 1.

From function IFstream::operator()
in file db/IOstreams/Fstreams/IFstream.C at line 171.

FOAM exiting

Fixes:

Please enter the folder $WM_PROJECT_DIR/applications/solvers/compressible/sonicLiquidFoam/, and edit the file createFields.H, then delete the line 41:

30 volScalarField rho
31 (
32 IOobject
33 (
34 "rho",
35 runTime.timeName(),
36 mesh,
37 IOobject::NO_READ,
38 IOobject::AUTO_WRITE
39 ),
40 rho0 + psi*(p-p0),
41 p.boundaryField().types()
42 );

and also delete the comma at the end of the previous line (line 40).

In addition, in file sonicLiquidFoam.C, I think rho0 + psi*p in line 105 should corrected as rho0 + psi*(p-p0) in order to compute the density rightly.

P.S. I post this bug and fix in my blog, www.durun.cn/?p=364
__________________
rdu
------------------
Martin/Run Du
chnrdu is offline   Reply With Quote

Old   May 21, 2008, 09:52
Default The transfer of the p BCs is a
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 22
henry is on a distinguished road
The transfer of the p BCs is a problem for complex BCs and your fix means that rho would get BCs of type "calculated" which should be OK. I will make this change in 1.5.

> In addition, in file sonicLiquidFoam.C, I think rho0 + psi*p in line 105 should corrected as rho0 + psi*(p-p0) in order to compute the density rightly.

I don't agree; note the difference between rho0 and rhoO. However for consistency rhoO + psi*p should be used on line 40 of createFields.H.

Henry
henry 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
Why Differences between tetrahedra polyhedra and prism mesh pipe flow computation with sonicLiquidFoam chnrdu OpenFOAM Running, Solving & CFD 5 May 7, 2018 03:23
TimeVaryingUniformFixedValue holger_marschall OpenFOAM Running, Solving & CFD 4 August 10, 2013 14:47
TimeVaryingUniformFixedValue BC in foam 15 nzy102 OpenFOAM Running, Solving & CFD 5 August 19, 2008 08:08
TimeVaryingUniformFixedValue does not work as a pressureInlet with sonicLiquidFoam nishant_hull OpenFOAM Running, Solving & CFD 5 May 21, 2008 08:54
TimeVaryingUniformFixedValue boundary condition liu OpenFOAM Running, Solving & CFD 1 October 12, 2007 13:19


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