CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Unsteady boundary condition for temperatureenergy (

kian September 18, 2007 20:52

Hello, Thanks to the answer

Thanks to the answers to another user's question, I was able
to implement unsteady boundary conditions in "sonicFoam" by
changing the boundary values in the code itself.

The variables I want to change at the boundaries are velocity
and temperature. There are no problems with velocity.
However, since the solver solves for internal energy, I need
to modify the boundary value for internal energy, as changing
temperature alone would not be correct.

This is not a problem for this case. However, I am planning to
have unsteady boundary conditions on reacting cases, with multiple
species, and I was wondering if there is a more elegant way to
do this?

Would using the "timeVaryingUniformFixedValue" type for the
boundary conditions solve this problem?
I tried to use it based on the answer given to another question,
but I get this error:

BICCG: Solving for Ux, Initial residual = 1, Final residual = 1.10364e-16, No Iterations 1

--> 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 160.

Thank you for your help,


otsuki September 19, 2007 01:58

Hi Kian, I assume you are u
Hi Kian,

I assume you are using OpenFOAM-1.4 or 1.4.1.
You need specify filename in boundaryField.
An example for T field is as follows:
type timeVaryingUniformFixedValue;
timeDataFileName "inletTemp";
value uniform 315;
File "inletTemp" must be placed in "<root>" or
the filename must include relative path from
<root> when you execute "sonicFoam <root> <case>".


kian September 19, 2007 10:02

Hi Masato, Thanks for your
Hi Masato,

Thanks for your help, but this is exactly what I did, except that I am on 1.3.1. Could this be the problem?



kian September 20, 2007 00:42

Hello again, I was trying t
Hello again,

I was trying to avoid 1.4.1, but I compiled the source, and I still get the same error:

file "" does not exist

Any suggestions?



otsuki September 20, 2007 01:06

Hi, Kian Sorry, this is not
Hi, Kian

Sorry, this is not a problem with versions.
For OF-1.3 and OF-1.4, I confirmed your problem
with sonicFoam & timeVarying..BC for T.

I found timevarying..BC works for
sonicTurbFoam using h.
In sonicTurbFoam, h is a data member of
basicThermo class. And basicThermo
calcualates h from T or T from h.
I guess timeVarying..BC for T works for another
applications using basicThermo class or derived
class of it.

kian September 20, 2007 16:07

Hello Masato, Thank you for
Hello Masato,

Thank you for you help, sonicTurbFoam does what I'm looking for.About the timeVaryingUniformFixedValue, I have found out that in sonicFoam, I can use it with the pressure boundary condition with no problems. However, when I do the same with temperature, I get this,

FOAM FATAL IO ERROR : file "" does not exist
, which looks like it does not read the file name in the temperature boundary condition.

Just curious.


Kian Mehravaran

otsuki September 20, 2007 22:23

Hi Kian, Explaining the dif
Hi Kian,

Explaining the different effect of
timeVaryingUniformFixedValue BC on T
for sonicFoam and sonicTurbFoam
( e=cv*T and thermo->h() ) is beyond
my understanding of FOAM.

I hope someone else will explain why.


All times are GMT -4. The time now is 16:35.