CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Requesting case sugestion for imposing a velocity source term, that simulates a pump

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2014, 10:02
Default Requesting case sugestion for imposing a velocity source term, that simulates a pump
  #1
New Member
 
Lala Sasa
Join Date: Jun 2014
Posts: 16
Rep Power: 11
ChukerSweet is on a distinguished road
Hi guys!
I need to impose a velocity source term, that simulates a pump, in a closed loop. The fluid is turbulent and incompressible, interested both in stationary and transitory condition.
Could someone indicate me a similar case study so I can extrapolate how to impose such condition?
THX in advance.
ChukerSweet is offline   Reply With Quote

Old   June 18, 2014, 11:34
Default
  #2
Senior Member
 
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 434
Rep Power: 22
cnsidero is on a distinguished road
Quote:
Originally Posted by ChukerSweet View Post
Hi guys!
I need to impose a velocity source term, that simulates a pump, in a closed loop. The fluid is turbulent and incompressible, interested both in stationary and transitory condition.
Could someone indicate me a similar case study so I can extrapolate how to impose such condition?
THX in advance.
In OF >= 2.2, there is a pressureGradientExplicitSource source available through fvOptions. This allows one to specify a target velocity and the source term will adjust the pressure gradient to achieve the target velocity. See $FOAM_SRC/fvOptions/sources/derived/pressureGradientExplicitSource for all the details. It can even be used for specific cell zones. This however, is a steady-state value.

If you need a time-varying source, there is - to my knowledge - none available. Your options would be to write a new fvOptions source for a time varying velocity or use swak4Foam which gives the ability to code in generic source term into your solver and one specifies the form of the source term in a dictionary.

The nice thing about the swak4Foam approach is once the generic source term is hooked into the solver, the mathematical form is specified through the dictionary. Therefore, if one wants to modify either the form or the parameters, no compilation is necessary. So one can easily experiment with the source term and the parameters. In fact, if one was so inclined, a parametric study of the source would be straightforward with a script.
cnsidero is offline   Reply With Quote

Old   June 18, 2014, 13:10
Default
  #3
New Member
 
Lala Sasa
Join Date: Jun 2014
Posts: 16
Rep Power: 11
ChukerSweet is on a distinguished road
Thank you very much for the reply. The fvOption will work for now.
Eventually I will need to use a variable pump condition but for the time being, and benchamrking porpoises a static one will do just fine.
Again THX allot
ChukerSweet is offline   Reply With Quote

Old   June 18, 2014, 13:49
Default
  #4
New Member
 
Lala Sasa
Join Date: Jun 2014
Posts: 16
Rep Power: 11
ChukerSweet is on a distinguished road
Just one little more. I can't seem able to "activate" the option...

One could write, from the header suggestion:
pressureGradientExplicitSourceCoeffs
{
fieldNames (U); // name of velocity field
Ubar (10.0 0 0); // desired average velocity
gradPini gradPini [0 2 -2 0 0] 0; // initial pressure gradient
flowDir (1 0 0); // flow direction
}

Or from the PimpleFoam/Channel395 example (found it ! )

momentumSource
{
type pressureGradientExplicitSource;
active on; //on/off switch
selectionMode all; //cellSet // points //cellZone

pressureGradientExplicitSourceCoeffs
{
fieldNames (U);
Ubar ( 0.1335 0 0 );
}
}
In which the pressure is applied all over the place, I think. Anyhow whter I put one or the other file in, let's say, the Cavity example (in the systemo folder) nothing happens. This is logical, the control files need to know that I'm trying to impose a velocity somewere, but how do I do this?

Sorry, and THX
ChukerSweet is offline   Reply With Quote

Old   June 18, 2014, 14:59
Default
  #5
Senior Member
 
Chris Sideroff
Join Date: Mar 2009
Location: Ottawa, ON, CAN
Posts: 434
Rep Power: 22
cnsidero is on a distinguished road
Quote:
Originally Posted by ChukerSweet View Post
In which the pressure is applied all over the place, I think.
Sorry, and THX
Yes but as I mentioned and as indicated in the sample fvOptions from the channel395 tutorial, one can apply to specific regions.

Code:
momentumSource
{
    type            pressureGradientExplicitSource;
    active          on;        // on/off switch
    selectionMode   all;       // cellSet // points //cellZone <= HERE

    pressureGradientExplicitSourceCoeffs
    {
        fieldNames  (U);
        Ubar        ( 0.1335 0 0 );
    }
}
You would replace 'all' with one of cellSet/points/cellZone and then specify the name of your set, e.g.

Code:
selectionMode cellSet;
cellZone rotor_zone;
and you would have to had previously created a cell zone called 'rotor_zone'. If your mesh generator doesn't support creating zones, use the setSet utility. The details of how fvOptions works on sub-regions is found in $FOAM_SRC/fvOptions/fvOptions/fvOption.C
cnsidero is offline   Reply With Quote

Old   June 23, 2014, 11:04
Default
  #6
New Member
 
Lala Sasa
Join Date: Jun 2014
Posts: 16
Rep Power: 11
ChukerSweet is on a distinguished road
THX allot for the info!
Yes, the fvOption should be accompanied with the topoSet function. Looking into it. The multiphase-> throttle exampe seams to implement it, though not combined with the fvOption
ChukerSweet is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 11:44
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


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