CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Shocktube in OpenFoam (http://www.cfd-online.com/Forums/openfoam/93497-shocktube-openfoam.html)

foamer October 17, 2011 14:53

Shocktube in OpenFoam
 
Hi

I am having problems with the shocktube tutorial.

There is in my interest to specify conditions on both sides on the Diaphragm, and henceforth run it.

I am not experienced in OpenFoam and hence not good at interpreting error messages.

The following error message appear when i was running the tutorial:




Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo <eConstThermo<perfectGas>>>>>


--> FOAM FATAL IO ERROR:
keyword sides is undefined in dictionary "/home/user/OpenFOAM/user-1.7.1/run/tutorials01/compressible/rhoCentralFoam/shockTube/0/p::boundaryField"

file: /home/user/OpenFOAM/user-1.7.1/run/tutorials01/compressible/rhoCentralFoam/shockTube/0/p::boundaryField from line 24 to line 30.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 456.

FOAM exiting




I can see that i have some problems in the "0" directory, pressure file, from line 24 to 30. My initial presseure file looks like this:



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

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

internalField uniform 0 0 0;
boundaryField
{
inlet
{
type fixedValue;
value uniform 10 0 0
}

empty
{
type empty;
}
}

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



I do not understand why my "sides" are "undefined".

Could someone please help me ?


Alex

foamer October 23, 2011 16:20

Hi

I know now what is my problem. And as simply as it sounds: I did not execute the setFields file.

Now i am running my case as the original shocktube tutorial without any changes.


However, when i am executing setFields, i am only geeting the error message:

wrong number of arguments, expect 0 found 2.

Can someone please tell me what is wrong and how i can get this tutorial to run properly ? I really want to know how i can make this work.

Alex

Linse October 24, 2011 09:23

Hi Alexander,
maybe I can shed some light onto the problem.

- The first problem simply comes from the "sides" not being defined within the initial pressure file while they are defined within your basic blockMeshDict (or another geometry dictionary). I guess some changeDict or something with a similar name does add these definitions/initial values.
At least I would get this error-message everytime I forget to specify a boundary within my initial setup-files. ;-)

- Concerning the setFields-problem: Could you please specify what options you use for that (just copy-paste the command you use to this thread)? I do not remember the correct use of it by heart, but usually that happens if you try to tell setFields too much, like having non-usable parameters while executing it...

foamer October 24, 2011 11:53

Hi Bernhard, thanks for your reply.


this is how my setFieldsDict file looks like:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues ( volVectorFieldValue U ( 0 0 0 ) volScalarFieldValue T 348.432 volScalarFieldValue p 100000 );

regions ( boxToCell { box ( 0 -1 -1 ) ( 5 1 1 ) ; fieldValues ( volScalarFieldValue T 278.746 volScalarFieldValue p 10000 ) ; } );


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

This is by the way the original setFieldsDict file, without any changes.



Alex

himanshu28 January 2, 2013 10:47

Regarding Setfieldfile
 
hi Alex,

i Just want to Know how do u excuted set field for to debug the error i am also trying to run the tutorial but is giving me the error as shown below I am new to open Foam if you can put some views on it...

vaio@ubuntu:~/OpenFOAM/vaio-2.1.1/run/shockTube$ rhoCentralFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : rhoCentralFoam
Date : Jan 02 2013
Time : 20:14:57
Host : "ubuntu"
PID : 28170
Case : /home/vaio/OpenFOAM/vaio-2.1.1/run/shockTube
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>
Reading field U

Creating turbulence model

Selecting turbulence model type laminar
Reading thermophysicalProperties

fluxScheme: Kurganov

Starting time loop

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 void Foam::divide<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::Vect or<double>, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
#4 Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::Vect or<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
#5
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
Floating point exception (core dumped)

Thanks
:confused::confused:

foamer January 5, 2013 10:03

Hi, could you please post your setfield file for me so i can have a look at it?

Alex

noshirvan January 5, 2013 11:02

1 Attachment(s)
Quote:

Originally Posted by foamer (Post 400206)
Hi, could you please post your setfield file for me so i can have a look at it?

Alex

hello alex
please run this tutorial with ./Allrun
if you dont have any error,look at in tutorial's file to found your problem
Attachment 17994


All times are GMT -4. The time now is 05:25.