CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Strange Velocity in impeller of MRFSimpleFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 11, 2008, 03:17
Default The case is on its way! /E
  #21
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 8
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
The case is on its way!

/E
lillberg is offline   Reply With Quote

Old   April 11, 2008, 04:09
Default Hi what is your dimension for
  #22
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Hi what is your dimension for omega? 620.823rad/s or 620.832rpm
waynezw0618 is offline   Reply With Quote

Old   April 11, 2008, 04:49
Default MRFZone require rad/s. (You ca
  #23
Member
 
Niklas Wikstrom
Join Date: Mar 2009
Posts: 85
Rep Power: 8
wikstrom is on a distinguished road
MRFZone require rad/s. (You can easily check the correct rotation velocity by looking at the tip velocity of the impeller blades.)

/Niklas
wikstrom is offline   Reply With Quote

Old   April 11, 2008, 05:11
Default Hi Eric: i am not quit sure
  #24
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Hi Eric:

i am not quit sure about you boundary but aftre 100 and more step the inlet vector looks strange too:

wayne
waynezw0618 is offline   Reply With Quote

Old   April 11, 2008, 08:12
Default Looks strange indeed! I'm runn
  #25
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 8
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
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 is offline   Reply With Quote

Old   April 11, 2008, 09:15
Default Hi Wayne, The case runs jus
  #26
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 8
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
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
lillberg is offline   Reply With Quote

Old   April 11, 2008, 09:59
Default Hi Eric thanks for you help
  #27
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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 is offline   Reply With Quote

Old   April 11, 2008, 10:29
Default by the ways what is the SLIP
  #28
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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 is offline   Reply With Quote

Old   April 14, 2008, 01:11
Default Hi could you tell me how t
  #29
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Hi

could you tell me how to use the massFlowrateBoundary condition?
in polymesh/boundary of 0/u?
waynezw0618 is offline   Reply With Quote

Old   April 14, 2008, 03:09
Default Hi I add to 0/U: INLE
  #30
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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?
waynezw0618 is offline   Reply With Quote

Old   April 14, 2008, 03:57
Default Add 'value' statement to your
  #31
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 8
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
Add 'value' statement to your BC in U.

INLET
{
type massFlowRateInletVelocity;
massFlowRate 3.06; // Mass flow rate [kg/s]
value uniform 3.06;
}
lillberg is offline   Reply With Quote

Old   April 14, 2008, 08:48
Default Hi Eric what is value uniform
  #32
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Hi Eric
what is value uniform 3.06refer to? massflow rate or velocity?


thanks

wayne
waynezw0618 is offline   Reply With Quote

Old   April 14, 2008, 08:54
Default I'm not sure about the impleme
  #33
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 8
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
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
lillberg is offline   Reply With Quote

Old   April 14, 2008, 23:21
Default Hi it still do not works if
  #34
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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 ?
waynezw0618 is offline   Reply With Quote

Old   April 15, 2008, 00:18
Default ok, then you need to write
  #35
Member
 
lillberg's Avatar
 
Eric Lillberg
Join Date: Mar 2009
Location: Stockholm
Posts: 80
Rep Power: 8
lillberg is on a distinguished road
Send a message via Skype™ to lillberg
ok, then you need to write

value uniform (0 0 0);

/eric
lillberg is offline   Reply With Quote

Old   April 15, 2008, 00:34
Default Hi Eric it can run with val
  #36
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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
waynezw0618 is offline   Reply With Quote

Old   April 15, 2008, 02:35
Default Wayne, As Eric said, you al
  #37
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
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.
olesen is offline   Reply With Quote

Old   April 15, 2008, 23:38
Default Hi Mark thanks for your reply
  #38
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
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
waynezw0618 is offline   Reply With Quote

Old   April 16, 2008, 02:36
Default Wayne, The dictionary class
  #39
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: http://olesenm.github.io/
Posts: 777
Rep Power: 18
olesen will become famous soon enough
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.
olesen is offline   Reply With Quote

Old   April 16, 2008, 22:30
Default Hi Mark thanks! wayne
  #40
Senior Member
 
wayne.zhang
Join Date: Mar 2009
Location: Shanghai, Shanghai, P.R.China
Posts: 307
Rep Power: 9
waynezw0618 is on a distinguished road
Send a message via MSN to waynezw0618 Send a message via Skype™ to waynezw0618
Hi Mark

thanks!

wayne
waynezw0618 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Equations in the MRFsimpleFOAM waynezw0618 OpenFOAM Running, Solving & CFD 5 May 7, 2015 04:43
Convergence with MRFSimpleFoam grugg OpenFOAM Running, Solving & CFD 7 March 28, 2014 05:56
MRFSimpleFoam xdanielx OpenFOAM Running, Solving & CFD 0 December 17, 2008 02:28
Strange Velocity JoeSa CFX 1 September 28, 2006 09:13
Strange oscillating velocity zonexo Main CFD Forum 2 April 6, 2006 11:38


All times are GMT -4. The time now is 04:17.