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

MRFSimpleFoam simulate centrifugal pump

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2017, 06:47
Default MRFSimpleFoam simulate centrifugal pump
  #1
New Member
 
Join Date: May 2017
Posts: 9
Rep Power: 8
jock is on a distinguished road
Hi foamers
I meet some questions about simulation of centrifugal pump ,I can not output its head and efficiency.
Who's gonna send me this program?
thank you
jack
jock is offline   Reply With Quote

Old   June 9, 2017, 08:51
Default
  #2
New Member
 
Antti Heino
Join Date: Mar 2014
Location: Finland
Posts: 9
Rep Power: 12
anttiad9000 is on a distinguished road
Hello jack,

I do this by using swak4Foam and an the built-in forces function. Once you have installed the swak4Foam add these lines to your controlDict:

Code:
libs
(
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
"libforces.so" // this is for forces
);
functions
{
    forces
    {
        type forces;
        outputControl timeStep;
        outputInterval 1;
        enabled true;
        patches
        (
            add_all_wetted_rotating_hydraulic_surfaces_here
        );
        rhoName rhoInf;
        log true;
        rhoInf add_fluid_density_here;
        CofR (0 0 0);
    }
    totalHead
    {
        type expressionField;
        outputControl timeStep;
        outputInterval 1;
        fieldName Htot;
        redirectType Htot;
        expression "p/9.81+pow(mag(U),2)/(2*9.81)";
        autowrite true;
        dimension [0 1 0 0 0 0 0];
    }
    Himpeller
    {
          type patchExpression;
          outputControl timeStep;
          outputControlMode timeStep;
          outputInterval 1;
          enabled true;
          variables
          (
               "Houtlet{add_impeller_outlet_patch_here}=sum(phi*Htot)/sum(phi);"
               "Hinlet{add_impeller_inlet_patch_here}=sum(phi*Htot)/sum(phi);"
          );
          patches
          (
               add_one_of_the_patches_here
          );
          expression "Houtlet-Hinlet";
          verbose true;
          allowCoupled true;
          accumulations ( average );
     }
}
With these functions force and torque components will be printed to the log and also to separate file every timestep. The same happens with head. You get the inlet power by multiplying torque in shaft direction with angular velocity, omega. The efficiency is calculated with the equation eta = (rho*g*Q*H)/(Pinlet). I hope this helps.

If you already have already finished you simulation, add the lines above to your controlDict and run one more time-step to get the output.

Also, if you do not have swak4Foam or don't want to install it for some reason you could also grep the data from result fields manually or by creating a script. Though, the method above is a much simpler approach.

P.S. There might be typos as I did not test it. Also remember to replace the patch names.

I hope this helps you,
Antti
anttiad9000 is offline   Reply With Quote

Old   June 9, 2017, 10:28
Default
  #3
New Member
 
Join Date: May 2017
Posts: 9
Rep Power: 8
jock is on a distinguished road
Thank you,Antti. I see.
I have some other questions.
I want to monitor the inlet and outlet pressure during the simulation. What should I do?May I use "foamCalc"?
thank you for much.
jack
jock is offline   Reply With Quote

Old   June 13, 2017, 03:33
Default
  #4
New Member
 
Antti Heino
Join Date: Mar 2014
Location: Finland
Posts: 9
Rep Power: 12
anttiad9000 is on a distinguished road
Hello jack,

To get proper monitors at every time step you can just change the Himpeller function from the previous post to two separate functions:

Code:
    Hinlet
    {
          type patchExpression;
          outputControl timeStep;
          outputControlMode timeStep;
          outputInterval 1;
          enabled true;
          variables
          (
"Hinlet{add_impeller_inlet_patch_here}=sum(phi*Htot)/sum(phi);"
          );
          patches
          (
               add_impeller_inlet_patch_here
          );
          expression "Hinlet";
          verbose true;
          allowCoupled true;
          accumulations ( average );
     }
    Houtlet
    {
          type patchExpression;
          outputControl timeStep;
          outputControlMode timeStep;
          outputInterval 1;
          enabled true;
          variables
          (
"Houtlet{add_impeller_outlet_patch_here}=sum(phi*Htot)/sum(phi);"
          );
          patches
          (
               add_impeller_outlet_patch_here
          );
          expression "Houtlet";
          verbose true;
          allowCoupled true;
          accumulations ( average );
     }
Personally, I have never used foamCalc but as far as I understand, foamCalc calculates a new field for a resolved timestep from another field. For example to get speed from velocity by calculating mag(U) from the field U. This would also mean that you have to save the data for each timestep you want to calculate it. It would not make sense here to use foamCalc.

Another point is that you need to calculate mass averaged value which reduces to volumetric average for incompressible flows which means that you have to combine two different fields which is exactly what the above function does with swak4Foam.

Antti
anttiad9000 is offline   Reply With Quote

Old   June 13, 2017, 08:44
Default
  #5
New Member
 
Join Date: May 2017
Posts: 9
Rep Power: 8
jock is on a distinguished road
Hi Antti,
I am using swak4Foam,thank you for your help!
Jack
jock is offline   Reply With Quote

Old   June 15, 2017, 05:45
Default
  #6
New Member
 
Join Date: Feb 2017
Posts: 4
Rep Power: 9
saleriCAE is on a distinguished road
Hi,

is it possible to use swak4foam also for taking the flow rate through a ggi patch and through a desired section?

Thank you
saleriCAE is offline   Reply With Quote

Old   June 15, 2017, 06:07
Default
  #7
New Member
 
Antti Heino
Join Date: Mar 2014
Location: Finland
Posts: 9
Rep Power: 12
anttiad9000 is on a distinguished road
Hi saleriCAE,

Although this is a bit off-topic I will give you a simple answer. I assume that by 'taking the flow rate' you mean monitoring the flow rate through a certain patch. If so, yes, it is possible and very simple. swak4Foam is a very useful tool to learn that makes implementing all kinds of monitors possible. You could do this for example with this function:

Code:
    Qmonitor
    {
          type patchExpression;
          outputControl timeStep;
          outputControlMode timeStep;
          outputInterval 1;
          enabled true;
          patches
          (
               patch_you_want_to_monitor
          );
          expression "phi";
          verbose true;
          allowCoupled true;
          accumulations ( sum );
     }
There are some differences to the function before as no new variables are needed here. Also, the accumulation is changed from average to sum as it is more appropriate in this case. In the last case it does not actually matter which one it is. Basically, the function just sums all the phi's on each patch face and outputs the sum to a file and, the log.

Hope this helps,
Antti
anttiad9000 is offline   Reply With Quote

Old   June 15, 2017, 10:46
Default
  #8
New Member
 
Join Date: Feb 2017
Posts: 4
Rep Power: 9
saleriCAE is on a distinguished road
Hi Antti,

thank you for your reply.

What if I want to take the flow rate through an arbitrary section of the model?
Let us assume I have a pipe from z=0 (patch inlet) to z=100 (patch outlet) and I want to take the flow rate at z=50 (where I have no patch defined). Is it possible with swak4foam?

Thank you very much.
saleriCAE is offline   Reply With Quote

Old   June 15, 2017, 12:32
Default
  #9
New Member
 
Antti Heino
Join Date: Mar 2014
Location: Finland
Posts: 9
Rep Power: 12
anttiad9000 is on a distinguished road
Hello saleriCAE,

yes that is at least somewhat possible. I have done this once over a year ago by creating an stl-surface file and used a swak4Foam function with some modifications. There should be an option that uses face zones/sets, when you would have to define the zone/set, but I am not familiar with it. Other options might exist as well but I haven't used them.

Also, unfortunately I cannot remember how to set up the function from the top of my head and I don't have time now to research the issue. I suggest that you search swak4Foam guides and examples, for instance here http://openfoamwiki.net/index.php/Contrib/swak4Foam

Antti
anttiad9000 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
Centrifugal Pump Simulation Problem! warex FloEFD, FloWorks & FloTHERM 29 September 23, 2014 10:27
Ercoftac centrifugal pump case study bug, Openfoam 1.6-ext (Floating point exception) ArianeJasmin OpenFOAM Programming & Development 1 April 4, 2012 14:11
[GAMBIT] influence between angle in impeller blade and centrifugal pump performance barak182 ANSYS Meshing & Geometry 2 August 18, 2010 03:07
CFD analysis of centrifugal pump saurabh9978 FLUENT 0 March 21, 2010 12:07
how to simulate centrifugal pump? Alex FLUENT 0 February 21, 2006 16:35


All times are GMT -4. The time now is 00:08.