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)

waynezw0618 April 10, 2008 03:44

Hi every one i am trying to
 
Hi every one
i am trying to simulate the centrifugal impeller with MRFSimpleFoam. after about 5000 steps there are strange velocity in only one passage,the velcity is much larger(above 1e +6 m/s).
here is the image of vector plot
http://www.cfd-online.com/OpenFOAM_D...ges/1/7277.jpg

waynezw0618 April 10, 2008 04:10

and here is the residual http
 
and here is the residual
http://www.cfd-online.com/OpenFOAM_D...ges/1/7280.jpg

dmoroian April 10, 2008 05:00

Take a look at k and epsilon r
 
Take a look at k and epsilon residuals and see which starts to diverge first (U, k or epsilon). Then decrease de order of discretization (take upwind for example) for that particular equation.
To be on the safe side use upwind for all of them.

Dragos

waynezw0618 April 10, 2008 05:56

Hi Dragos i will try it today
 
Hi Dragos
i will try it today
and here is the p k and epsilon
http://www.cfd-online.com/OpenFOAM_D...ges/1/7282.jpg

thanks
wayne

dmoroian April 10, 2008 06:04

Well Wayne, It seems that k a
 
Well Wayne,
It seems that k and epsilon are ok, you have to see which starts to diverge first: pressure equation or momentum?

Dragos

waynezw0618 April 10, 2008 06:40

Hi Dragos it looks like there
 
Hi Dragos
it looks like there are the same
http://www.cfd-online.com/OpenFOAM_D...ges/1/7284.jpg


and it quit similar to the iteration procedure in cfx(i will post later,for i am not working on that computer),but there is no such strange velocity.

thanks

wayne

dmoroian April 10, 2008 06:49

Hmm, to me it looks that press
 
Hmm, to me it looks that pressure starts to diverge first. So you can try to converge better the pressure equation.

waynezw0618 April 10, 2008 07:46

Hi Dragos how to? would you
 
Hi Dragos

how to? would you mind to tell me more ?

wayne

lillberg April 10, 2008 07:56

Hi Wayne, Is your outflow b
 
Hi Wayne,

Is your outflow boundary the one in the picture or does it only show a part of the whole model. If it is your outflow boundary, what boundary conditions have chosen for it?

Also, post an image of your mesh or the output from the checkMesh utility.

Regards

//Eric

dmoroian April 10, 2008 08:05

I use this seting for the pres
 
I use this seting for the pressure equation (fvSolution):
p PCG
{
<blockquote>preconditioner GAMG
{
<blockquote>tolerance 1e-6;
relTol 0.05;

smoother DICGaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nBottomSweeps 2;

cacheAgglomeration false;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
};

tolerance 1e-6;
relTol 0.05;
maxIter 100;</blockquote>
};
</blockquote>


waynezw0618 April 10, 2008 08:25

To Eric: i use the fixedValue
 
To Eric:
i use the fixedValue in p for my output condition. the calcualtion region is a impeller without the voulte,so you can see them on the first image!

Wayne

waynezw0618 April 10, 2008 08:27

To Dragos thanks! i will
 
To Dragos

thanks!

i will try!

Wayne

lillberg April 10, 2008 09:27

Wayne, Your outflow boundar
 
Wayne,

Your outflow boundary is way to close to the region where things happen to allow for fixed pressure BC. Use totalPressure BC instead together with appropriate BC's for U pressureInletOutletVelocity, k inletOutlet and epsilon inletOutlet.

Regards

/eric

waynezw0618 April 10, 2008 23:50

Hi: i try to run the case in
 
Hi:
i try to run the case in the parallel again without change anything in fvSolution.i still get a divergence. but the different is i donot get strange velocity like before,and the velocity is also looks quiet strange.it looks like that there is no velocity inlet just angular velocity everywhere including the velocity inlet.

here is the residual
http://www.cfd-online.com/OpenFOAM_D...ges/1/7302.jpg

waynezw0618 April 10, 2008 23:51

and is the velocity in 0.5 spa
 
and is the velocity in 0.5 spanwise
http://www.cfd-online.com/OpenFOAM_D...ges/1/7304.jpg

waynezw0618 April 10, 2008 23:53

and the velocity in 0.5spanwis
 
and the velocity in 0.5spanwise in CFX
http://www.cfd-online.com/OpenFOAM_D...ges/1/7306.jpg

lillberg April 11, 2008 02:45

Hi Wayne, Surely looks a bi
 
Hi Wayne,

Surely looks a bit strange! Could just be a fault in the setup!? What about your makeMesh config, are the faceZones set up properly in the parallel case?

I've run dozens of impellers like yours using the MRF and also comparing with sliding mesh simulations (in general < 5% difference in total flowrate) and also tabulated values (generally < 15% difference on coarse meshes).

Two things about your simulations tells me you'll end up in trouble sooner or later and therefor should be fixed. Firstly, change the location and/or type of your outflow BC. Secondly, if things don't work in serial runs don't bother doing them in parallel. If your case is too big use a coarser mesh to start with.

Also, try the pressure solver settings Dragos showed above. Additionally, run the case with upwind defferencing only for all variables and add "Interpolate(U) upwind phi;" to your interpolation settings in fvSchemes.

Good luck,

/Eric

waynezw0618 April 11, 2008 03:12

Hi Eric would you mind to se
 
Hi Eric
would you mind to send one of your setting(such as makemesh/fvSolution/fcScheme/MRFZones/dynamicMeshDict/Boudary/0 dictionary )or me ?

thanks!

wayne

lillberg April 11, 2008 03:41

Sure, Send your e-mail adr
 
Sure,

Send your e-mail adress to eric.lillberg@afconsult.com

/E

waynezw0618 April 11, 2008 04:01

Hi My email adress is wayne
 
Hi

My email adress is waynezw0618@163.com i have sent a email to you.if it was too large for you to send me.please send the setting files(such as makemesh/fvSolution/fcScheme/MRFZones/dynamicMeshDict/Boudary/0 dictionary or other)to me!

thanks!

wayne

lillberg April 11, 2008 04:17

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

/E

waynezw0618 April 11, 2008 05:09

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

wikstrom April 11, 2008 05: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 06: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 09: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 10: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 10: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 11: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 02: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 04: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 04: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 09: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 09: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 15, 2008 00: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 01:18

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

value uniform (0 0 0);

/eric

waynezw0618 April 15, 2008 01: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 03: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 16, 2008 00: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 03: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 23:30

Hi Mark thanks! wayne
 
Hi Mark

thanks!

wayne


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