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/)
-   -   rotating pressure inlet static mesh simpleFOAM (https://www.cfd-online.com/Forums/openfoam-solving/227366-rotating-pressure-inlet-static-mesh-simplefoam.html)

cduchat May 26, 2020 15:23

rotating pressure inlet static mesh simpleFOAM
 
Hi all,


I am fairly new to openFOAM and having difficulties with a simulation: the domain is mostly cylindrical surrounding a cutout (defining channels like a volute and a couple pitot tubes), the outer boundaries of the domain are rotating walls ("walls-rotating") while the cutout is static walls ("walls-static"), the mesh is a single zone so I cannot really use a multiple reference frame approach. Linked to the static cutout and channels are two static outlets ("outlet" and "outlet-pitots"), while at the bottom of the domain and toward the outer diameter is a circular band where I want a rotating pressure inlet ("inlet") where the pressure controls the inflow but whatever enters does so at a specific rotation speed.


I am using BlueCFD-core 2017-2 (based on openFOAM v5), the simpleFOAM solver (steady-state simulation), and getting the following error:
Quote:

--> FOAM FATAL IO ERROR:
keyword value is undefined in dictionary "C:/Users/Chris/Desktop/SVR-GTI/0/U.boundaryField.inlet"

file: C:/Users/Chris/Desktop/SVR-GTI/0/U.boundaryField.inlet from line 32 to line 34.

From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
in file db/dictionary/dictionary.C at line 566.

FOAM exiting

Here are the corresponding lines in the 0/U file:
Quote:

30 inlet
31 {
32 type rotatingPressureInletOutletVelocity;
33 tangentialVelocity uniform (0.0 0.0 0.0);
34 omega constant 297.72;
35 }

And the pressure condition in the 0/p file:
Quote:

inlet
{
type totalPressure;
p0 uniform 631.1;
gamma 0;
}

I also tried a different 0/U inlet condition that allowed to run but resulted in no inlet flow despite the pressure condition (instead the simulation seemed to treat "inlet" like a rotating wall and my fluids were entering the domain through "outlet-pitots" and exiting through "outlet"):
Quote:

inlet
{
type cylindricalInletVelocity;
value uniform (0.0 0.0 0.0);
origin (0.0 0.0 0.0);
axialVelocity constant 0.0;
radialVelocity constant 0.0;
axis (0.0 0.0 1.0);
rpm constant 2843.0;
}

What am I missing/doing wrong?

crubio.abujas May 26, 2020 15:44

Add a value field inside the boundary definition
 
The crucial part of the error message if here.

Code:

--> FOAM FATAL IO ERROR:
keyword value is undefined in dictionary "C:/Users/Chris/Desktop/SVR-GTI/0/U.boundaryField.inlet"
...

You need to define a field "value" on the definition. Sometimes this value is never used, but it expected it, probably for inheritance from other fields where this field is in usage. The safe approach is to always define it, if the type don't need a value it just ignore this value and do its thing.

Try adding something like this:
Code:


 inlet
{
    type            rotatingPressureInletOutletVelocity;
    tangentialVelocity uniform (0.0 0.0 0.0);
    omega          constant 297.72;
    value  uniform(0 0 0);

 }

It is a good skill to interpret the information on the error messages. It can be a little intimated at first but you get use to it. Next time you see a "keyword XXX is undefined in dictionary YYY" you'll know where to look. ;)

Hope it helps!

cduchat May 26, 2020 16:00

Thanks... new error messeage... maybe solved.
 
Thanks a lot Carlos, I had looked into the source files and they were not calling for a "value" field, that's what threw me off.



I added the value field and it helped but I got another error message:
Quote:

--> FOAM FATAL IO ERROR:
Expected a '(' while reading VectorSpace<Form, Cmpt, Ncmpts>, found on line 34 the doubleScalar 297.72

file: C:/Users/Chris/Desktop/SVR-GTI/0/U.boundaryField.inlet.omega at line 34.

From function Foam::Istream& Foam::Istream::readBegin(const char*)
in file db/IOstreams/IOstreams/Istream.T.C at line 92.

FOAM exiting

I gathered the "omega" was not expecting a scalar rotation speed, but rather a vector... I gave a try to "uniform (0 0 297.72)" and it seems to work (simulation running, we'll see if it does what I want it to).

cduchat May 26, 2020 16:15

Solved.
 
I had to add a negative sign to my omega as it was spinning the wrong way, but otherwise it appears to be running just as intended.


Thanks again Carlos.

crubio.abujas May 27, 2020 02:30

You're welcome
 
Quote:

Originally Posted by cduchat (Post 772064)
I had to add a negative sign to my omega as it was spinning the wrong way, but otherwise it appears to be running just as intended.


Thanks again Carlos.

Glad to know it helped you!


Good luck and happy foaming ;)


All times are GMT -4. The time now is 21:23.