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/)
-   -   Strange Velocity in impeller of MRFSimpleFOAM (https://www.cfd-online.com/Forums/openfoam-solving/58483-strange-velocity-impeller-mrfsimplefoam.html)

lillberg April 11, 2008 03:17

The case is on its way! /E
 
The case is on its way!

/E

waynezw0618 April 11, 2008 04:09

Hi what is your dimension for
 
Hi what is your dimension for omega? 620.823rad/s or 620.832rpm

wikstrom April 11, 2008 04:49

MRFZone require rad/s. (You ca
 
MRFZone require rad/s. (You can easily check the correct rotation velocity by looking at the tip velocity of the impeller blades.)

/Niklas

waynezw0618 April 11, 2008 05:11

Hi Eric: i am not quit sure
 
Hi Eric:

i am not quit sure about you boundary but aftre 100 and more step the inlet vector looks strange too:
http://www.cfd-online.com/OpenFOAM_D...ges/1/7311.jpg
wayne

lillberg April 11, 2008 08:12

Looks strange indeed! I'm runn
 
Looks strange indeed! I'm running the case to make sure I haven't made any stupid alterations that prevents it from converging.

Maybe my collegue Niklas can send you one of his cases?

/Eric

lillberg April 11, 2008 09:15

Hi Wayne, The case runs jus
 
Hi Wayne,

The case runs just fine here. Just let it run for some 500-1000 iterations, and it will look much nicer. The mesh is so coarse that you'll need to relax k and epsilon substantially (0.01 or 0.001) during the first 200-300 iterations, but it's typical OF behaviour.

Also, you can reduce the non-orthogonal corrections to 0 to prevent the solver from holding on to a bad solution.

/Eric

waynezw0618 April 11, 2008 09:59

Hi Eric thanks for you help
 
Hi Eric

thanks for you help.what i am do not know how to set the boundary in OF, what i always do in CFX is :

inlet -> massflow inlet (etc.Q kg/s)
outlet -> average static pressure (0 pa)

how can i define these boundaries?

thank!

wayne

waynezw0618 April 11, 2008 10:29

by the ways what is the SLIP
 
by the ways
what is the SLIP boundary in your case ?in my case the hub and shroud are all rotating boundary like blade(i patch them in MRFZones file).and in CFX the hub and shroud are always in that way.
any way if possible please let your collegue Niklas send me one of his cases.thanks!

wayne

waynezw0618 April 14, 2008 01:11

Hi could you tell me how t
 
Hi

could you tell me how to use the massFlowrateBoundary condition?
in polymesh/boundary of 0/u?

waynezw0618 April 14, 2008 03:09

Hi I add to 0/U: INLE
 
Hi

I add to 0/U:
INLET
{
type massFlowRateInletVelocity;
massFlowRate 3.06; // Mass flow rate [kg/s]

}

the error is
--> FOAM FATAL IO ERROR : keyword value is undefined in dictionary "/home/waynezw0618/OpenFOAM/waynezw0618-1 .4.1/run/impeller/./GS1/0/U::INLET"

file: /home/waynezw0618/OpenFOAM/waynezw0618-1.4.1/run/impeller/./GS1/0/U::INLET from line 33 to line 36.

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


how can i dfine the massflowratevelocity boundary?

lillberg April 14, 2008 03:57

Add 'value' statement to your
 
Add 'value' statement to your BC in U.

INLET
{
type massFlowRateInletVelocity;
massFlowRate 3.06; // Mass flow rate [kg/s]
value uniform 3.06;
}

waynezw0618 April 14, 2008 08:48

Hi Eric what is value uniform
 
Hi Eric
what is value uniform 3.06refer to? massflow rate or velocity?


thanks

wayne

lillberg April 14, 2008 08:54

I'm not sure about the impleme
 
I'm not sure about the implementation, but generally it implies the default starting value of the BC, in this case massflow rate. If you get an error post it here and I'll check it.

//Eric

waynezw0618 April 14, 2008 23:21

Hi it still do not works if
 
Hi
it still do not works
if run without value uniform 3.06; error message is :

--> FOAM FATAL IO ERROR : keyword value is undefined in dictionary "/home/waynezw0618/OpenFOAM/waynezw0618-1.4.1/run/tutorials/icoFoam/inlettry/0/U ::in"

file: /home/waynezw0618/OpenFOAM/waynezw0618-1.4.1/run/tutorials/icoFoam/inlettry/0/U: :in from line 34 to line 35.

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

FOAM exiting


and if with red{value uniform 3.06; } the error is:
--> FOAM FATAL IO ERROR : Expected a '(' while reading VectorSpace<form,>, found on line 36 the doubleScalar 3.06

file: /home/waynezw0618/OpenFOAM/waynezw0618-1.4.1/run/tutorials/icoFoam/inlettry/0/U: :value at line 36.

From function Istream::readBegin(const char*)
in file db/IOstreams/IOstreams/Istream.C at line 94.

FOAM exiting

i turn to Doxygen,and example of the BC specification::
inlet
{
type massFlowRateInletVelocity;
massFlowRate 0.2; // Mass flow rate [kg/s]
}

how to ?

lillberg April 15, 2008 00:18

ok, then you need to write
 
ok, then you need to write

value uniform (0 0 0);

/eric

waynezw0618 April 15, 2008 00:34

Hi Eric it can run with val
 
Hi Eric

it can run with value uniform (0 0 0); but it looks like the boundary velocity is defined by (0 0 0),not as a massflowRateInletVelocity. and when i turn to Doxygen,there is no such construct of massFlowRateInletVelocity.

can you tell me the details ?
thanks

wayne

olesen April 15, 2008 02:35

Wayne, As Eric said, you al
 
Wayne,

As Eric said, you also need to add a 'value' entry to the dictionary. I.e., 'value' for generic initialization (you can consider it a placeholder) and the 'massFlowRate' is used for actually setting the boundary condition as a fixed massflow rate.

At the following iterations you'll see that the 'value' field is indeed filled with the calculated velocity field on the boundary patch.

As for your point
Quote:

it looks like the boundary velocity is defined by (0 0 0), not as a massflowRateInletVelocity. and when i turn to Doxygen,there is no such construct of massFlowRateInletVelocity.
I'm not sure which documentation you are using, but the version on sourceforge does show construction from a dictionary:

massFlowRateInletVelocityFvPatchVectorField
(
const fvPatch&,
const DimensionedField ...&,
const dictionary&
);

If in doubt, you should always take the source code as being authoritative. This is the really beauty of OpenFOAM - the algorithms are open for viewing and you can adjust them for your purposes.

waynezw0618 April 15, 2008 23:38

Hi Mark thanks for your reply
 
Hi Mark
thanks for your reply,for i am not quite familiar with C++.so please excuse my question.
in the construction
\quote {
massFlowRateInletVelocityFvPatchVectorField
(
const fvPatch&,
const DimensionedField ...&,
const dictionary&
):
fixValueFvPatchField<vector>(p,iF,dict)
....
}
and this construction will be initialized by fixValueFvPatchField<vector>(p,iF,dict),and then i turn fixValueFvPatchField to find relative construction.and it is initialized by:
fvPatchField<type>(p,iF,Field<type>("value",dict,p .size()))

and what is the "value" here? how does the "dict" works?


by the way another quesion
in the member function of massFlowRateInletVelocity there is
operator==(n*avgU/rhop)
what is the use of == ? is it overloaded the '==' operator for the volVectorField
type as the "="?

thanks

wayne

olesen April 16, 2008 02:36

Wayne, The dictionary class
 
Wayne,

The dictionary class *is* explained in doxygen docs. It is also possible to follow the inheritance of the fixedmass patch via the doxygen docs to find out which class has implemented the 'operator==' (not to be confused with the 'operator=').

Perhaps someone else on the forum would be kind enough to do the digging for you and explain it. Otherwise you'll have to do it yourself.
A modicum of C++ knowledge might be useful.

waynezw0618 April 16, 2008 22:30

Hi Mark thanks! wayne
 
Hi Mark

thanks!

wayne


All times are GMT -4. The time now is 11:43.