CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Tutorial problem sonicTurbFoamnacaAirfoil (https://www.cfd-online.com/Forums/openfoam-solving/59021-tutorial-problem-sonicturbfoamnacaairfoil.html)

jjhall March 18, 2008 00:47

Hello. I am new to OpenFOAM a
 
Hello. I am new to OpenFOAM and am trying to go through some tutorials to get a feel for how everything works. I've done a couple of the simple ones, and now I'm having trouble with the naca airfoil. I have set the inlet to supersonicFreestream, and then I set Uinf to the value that already existed in the internal field value. Now, when I go to the INLE1 parameters for U, there are inputs for pinf, Tinf, Uinf, and something simply called value. Value has inputs for x, y, and z, so I figured it was velocity vector and entered the same numbers as Uinf.

Now, when I try to run, I get :

--> FOAM FATAL IO ERROR : keyword gamma is undefined in dictionary "/home/jjhall/OpenFOAM/jjhall-1.4.1/run/tutorials/sonicTurbFoam/nacaAirfoil/0/U: :INLE1"

I also looked through the thermophysical properties, and did not see any place where gamma is defined.

Could someone tell me if I am setting "value" incorrectly, and what it means? Or, if not, what am I doing wrong?

Thanks,

Jeremiah

jjhall March 18, 2008 00:49

By the way, here is nacaAirfoi
 
By the way, here is nacaAirfoil/0/U :

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

// Field Dictionary

FoamFile
{
version 2.0;
format ascii;

root "/home/jjhall/OpenFOAM/jjhall-1.4.1/run/tutorials/sonicTurbFoam";
case "nacaAirfoil";
instance "0";
local "";

class volVectorField;
object U;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


dimensions [0 1 -1 0 0 0 0];

internalField uniform (600 148.16 0);

boundaryField
{
INLE1
{
type supersonicFreestream;
pInf 100000;
TInf 300;
UInf (600 148.16 0);
value uniform (600 148.16 0);
}

OUTL2
{
type zeroGradient;
}

SYMP3
{
type symmetryPlane;
}

WALL10
{
type fixedValue;
value uniform (0 0 0);
}
}


// ************************************************** *********************** //

graser March 18, 2008 03:44

In this case you just have to
 
In this case you just have to read the error-message
It says that there is a keyword "gamma" missing in your file:
/home/jjhall/OpenFOAM/jjhall-1.4.1/run/tutorials/sonicTurbFoam/nacaAirfoil/0/U
at the patch:
INLE1

I simply would define a new keyword there named "gamma" and set it like the others (as you can read in the User Manual gamma describes the ratio between gas and liquid e.g. 0 = 100% gas / 1 = 100% liquid)
It could for examle look like this:
...
INLE1
{
type supersonicFreestream;
pInf 100000;
TInf 300;
UInf (600 148.16 0);
gamma 0;
value uniform (600 148.16 0);
}
...

jjhall March 18, 2008 09:21

Thanks for the reply. I did i
 
Thanks for the reply. I did implement this change, except when I used gamma = 0, I got a long list of errors. I changed it to gamma = 1.4, and now it is running fine (at the moment).

I am a little bit confused with this issue because I am using FoamX to set up the case. I had expected that FoamX would recognize the boundary condition type and properly create all of the necessary input variables, but gamma was not an option to set. Is this a bug in FoamX? Or am I just doing something wrong?

Thanks,

Jeremiah

jjhall March 18, 2008 09:30

By the way, I now have a diffe
 
By the way, I now have a different problem. sonicTurbFoam has crashed:

--> FOAM FATAL ERROR : Maximum number of iterations exceeded#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/jjhall/OpenFOAM/OpenFOAM-1.4.1/lib/linux64GccDPOpt/libOpenFOAM.so"

I see at the end of the sonicTurbFoam.log that there are "time step continuity errors" on the time step before the crash. Also, it says that it is bounding epsilon, with a range of approx. -10^28 to +10^28. Is the crash coming from large values of epsilon, or some issue with the time step continuity?

graser March 19, 2008 04:05

Hello Jeremiah Concerning Foa
 
Hello Jeremiah
Concerning FoamX I noticed that sometimes it is not up to date with the solvers or boundary conditions. But I have to say...I don't care because I'm nt using FoamX. Therefore you would need help from a more experienced user of this board.

The "time step continuity errors" are calculated and printed every timestep. They can be usefull to observe how your calculation converges. Therefore the size of the residuals should be what you're looking at. As you can see there are 3 different types of residuals "sum local", "global" and "comulative". Unfortunately I don't really know what they exactly mean http://www.cfd-online.com/OpenFOAM_D...lipart/sad.gif , I hope some more experienced user can help with this.

In my opinion the crash is coming from the large values of epsilon. Maybe you should try some other values for epsilon and k at your boundarys (you could for example calculate them). I also experienced that you get better convergence with a decent initiation of your internal field (use potentialFoam and/or lower viscosity; search the board).

Max

jjhall March 19, 2008 08:21

Thanks for the advice, Max. I
 
Thanks for the advice, Max. I kind of suspected that the large values of epsilon were the culprit. I will try to use potentialFoam to initialize the field, and set the inlet of epsilon smaller (I had just used the internal field value that was already set up).

Does anyone know if there is a possibility to limit epsilon? At work I run GASP, with a k-omega model, and I enforce a limit on omega. Is there a possibility for this in OpenFOAM?

Thanks,

Jeremiah


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