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

Monitoring Torque on rotating body in MRFSimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2011, 03:17
Default
  #21
Member
 
s.rasoul_varedi
Join Date: Feb 2010
Posts: 82
Rep Power: 15
desert_1250 is an unknown quantity at this point
Send a message via Yahoo to desert_1250
tnx Linnemann, your suggestion is the best you are right
desert_1250 is offline   Reply With Quote

Old   February 21, 2012, 16:15
Default
  #22
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Hello Niels,

I am trying to use this forces function to extract moment. But the output is all the time zero. would you have an idea of what I am doing wrong?
Here is a sample output:
-----------------------
forces output:
forces(pressure, viscous)((0 0 0) (0 0 0))
moment(pressure, viscous)((0 0 0) (0 0 0))
--------------------
Basically what I am trying to do is to get the moment and calculate the rpm such that the next iteration has this rpm.

Thank you for your time.

Best regards.
ebah6 is offline   Reply With Quote

Old   February 21, 2012, 17:35
Default
  #23
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Hello Niels and anyone reading this post and the previous one,

Please, disregard the fact about the outputs being all zeros.
I made a stupid mistake by not mis-spelling on of my patches.

Yet if one has a lead on the second part, any suggestion is welcome.

My best regards.
ebah6 is offline   Reply With Quote

Old   March 1, 2012, 17:52
Default
  #24
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Dear all,

Is there a way to choose the output format.
For instance, in file forces/0/forces.dat, every thing is output in one line for each time step.
How should proceed to have this output in column.
e.g.,
Fpx = ....
Fpy = ....
Fpz = ....
etc.

I want to do this because I need to read some of the components and do some calculations the result od which I feed to the next iteration.

Thank you all for your time.
ebah6 is offline   Reply With Quote

Old   March 7, 2012, 13:48
Default
  #25
New Member
 
Gabriele
Join Date: Feb 2012
Posts: 6
Rep Power: 14
protarius is on a distinguished road
Hi

There is a Python script in this thread:

http://www.cfd-online.com/Forums/ope...-brackets.html

Regards
protarius is offline   Reply With Quote

Old   March 8, 2012, 00:08
Default
  #26
Member
 
Elh. A2. BAH
Join Date: Jan 2012
Posts: 64
Rep Power: 14
ebah6 is on a distinguished road
Thanks Gabriele for answering,

I wrote a dummy script of my own.

Best regards.
ebah6 is offline   Reply With Quote

Old   July 2, 2012, 05:43
Default
  #27
New Member
 
prasanth
Join Date: Jul 2010
Location: Chennai, India
Posts: 17
Rep Power: 0
prasanth is on a distinguished road
Hello All,

Can any body face the issue with torque value in OpenFOAM? Currently I am using OpenFOAM-2.1.1. Torque value is not matching with any of the other commercial packages like CCM+ or fluent etc. In CCM+ there is option called wall rotation set to zero for some patches. Is it same as non rotating Patches in OpenFOAM. If I am giving patch names under non rotating patches, velocity is showing zero on those patches. According to settings, it is correct only. But There is a Rotating Zone. So, there should be some relative velocity on those patches. I am thinking, this may be the reason, why OF torque value is not matching. May be my thinking can be wrong.

Can any body help me on this.
prasanth is offline   Reply With Quote

Old   July 2, 2012, 05:44
Default Torque value in OpenFOAM
  #28
New Member
 
prasanth
Join Date: Jul 2010
Location: Chennai, India
Posts: 17
Rep Power: 0
prasanth is on a distinguished road
Hello All,

Can any body face the issue with torque value in OpenFOAM? Currently I am using OpenFOAM-2.1.1. Torque value is not matching with any of the other commercial packages like CCM+ or fluent etc. In CCM+ there is option called wall rotation set to zero for some patches. Is it same as non rotating Patches in OpenFOAM. If I am giving patch names under non rotating patches, velocity is showing zero on those patches. According to settings, it is correct only. But There is a Rotating Zone. So, there should be some relative velocity on those patches. I am thinking, this may be the reason, why OF torque value is not matching. May be my thinking can be wrong.

Can any body help me on this.
prasanth is offline   Reply With Quote

Old   February 6, 2013, 18:16
Default
  #29
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 13
pechwang is on a distinguished road
Hi Linnemann,

I want to know the torques on two patches. So I added two names. However, OpenFOAM only gives me the sum of the two torques. Can you help me with this? Thank you very much.

Pengchuan

Quote:
Originally Posted by linnemann View Post
Just a question.

Why dont you just use the forces library already present in OF?

put this in the end of the controlDict.

Code:
functions
(
    forces
    {
        type forces;
        functionObjectLibs ("libforces.so");
        outputControl timeStep;
        outputInterval 1;
        patches (wallBlade);
//        pname p;
//        Uname U;
        rhoName rhoInf;
        log true;
        rhoInf 1.205;
        CofR (0 0 0);
    }
);
This will output the forces/torque in x,y,z direction.

The output to the terminal will look like this.

Code:
    forces(pressure, viscous)((2162.2 -313.192 35.8823) (12.5865 3.1166 3.97532))
    moment(pressure, viscous)((1162.4 6862.37 100.944) (-12.5067 35.4299 -50.9462))
Then you can always make your own script to add the pressure torque with the viscous torque or just calculate them by hand.
pechwang is offline   Reply With Quote

Old   February 7, 2013, 09:11
Default
  #30
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
hello,

I guess you already have find the solution, but just in case :

Code:
functions
(
forces_patch1
   {
   type forces;
   ...
   patches (patch1);
   ...
   }
forces_patch2
   {
   type forces;
   ...
   patches(patch2);
   ...
   }
)
regards,
olivier
sharonyue and Tobias Adam like this.
olivierG is offline   Reply With Quote

Old   February 7, 2013, 10:33
Default
  #31
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 13
pechwang is on a distinguished road
Hi Olivier,

Thank you very much. It helps me a lot. I have another question. Do you know how to calculate the flow rate on one surface. It seems that it is very complex to do that. Is that right?Thank you again.

Pengchuan
pechwang is offline   Reply With Quote

Old   February 7, 2013, 10:59
Default
  #32
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18
olivierG is on a distinguished road
Hello Pengchuan,

If you are using OF version <= 2.0, take a look at http://openfoamwiki.net/index.php/Contrib_simpleFunctionObjects.
If this is not the case, take a look at swak4foam.

regards,
olivier
olivierG is offline   Reply With Quote

Old   March 19, 2013, 20:55
Default
  #33
Member
 
Pengchuan Wang
Join Date: Nov 2012
Location: Michigan USA
Posts: 58
Rep Power: 13
pechwang is on a distinguished road
Hi Olivier,

Now I use SRFSimplefoam to do some simulations. In SRFsimpleFoam, there is no U file, only Urel. I modify the code to Pname P; Uname Urel. Unfortunately, it didn't work. Can you give me a hand on this?
Tobias Adam likes this.
pechwang is offline   Reply With Quote

Old   September 9, 2013, 22:34
Default
  #34
New Member
 
QuocThien
Join Date: Apr 2013
Posts: 16
Rep Power: 13
neiht is on a distinguished road
I think just waiting for some writing steps and modify controdict with Uabs.
neiht is offline   Reply With Quote

Old   November 12, 2013, 06:58
Default
  #35
Senior Member
 
MadsR's Avatar
 
Mads Reck
Join Date: Aug 2009
Location: Copenhagen, Denmark
Posts: 177
Rep Power: 18
MadsR is on a distinguished road
Hi guys,

I use Urel (this is the only one that works) in the force section of controlDict but I get very wrong torque. Any suggestions here? Or anyone having issues with SRFSimpleFoam and torque/forces.

Mads
__________________
Online free airfoil-mesher for OpenFOAM here
MadsR is offline   Reply With Quote

Old   November 18, 2013, 09:01
Default Calculating Forces at SRFSimpleFoam
  #36
Member
 
Tobias Adam
Join Date: Oct 2013
Location: Siegen
Posts: 55
Rep Power: 13
Tobias Adam is on a distinguished road
I have the same problem as Pengchuan. I use SRFSimpleFoam and donīt get the right name for U. I even tried Urel but it didnīt work!
Code:
 forces
    {
        type forces;
        functionObjectLibs ("libforces.so");
        outputControl timeStep;
        outputInterval 20;
        patches (BLADE);
        pname p;
        Uname Uabs;   // or Urel, or U, nothing worked...
        rhoName rhoInf;
        log true;
        rhoInf 1.205;
        CofR (0 0 0);
        liftDir (0 0 1);
        dragDir (1 0 0);


I get the following error message:
Code:
  FOAM Warning : 
    From function void forces::read(const dictionary&)
    in file forces/forces.C at line 449
    Could not find U, p in database.
    De-activating forces.


I donīt understand why Urel does not work.
I use a second Run-time Post-processing library called Probes which works perfectly with Urel.
Code:
probes
     {
        type probes;
        functionObjectLibs ("libsampling.so");
        probeLocations ((0 0 -0.7) (1 0 -0.1) (1 0 0.1)  (1.55 0 0));
        fields ( Urel p );


Thank you very much for your help.

Best regards
Tobias


Tobias Adam is offline   Reply With Quote

Old   November 18, 2013, 09:47
Default
  #37
Senior Member
 
Aurelien Thinat
Join Date: Jul 2010
Posts: 165
Rep Power: 16
Aurelien Thinat is on a distinguished road
Hi Tobias,

I have never used SRFSimpleFoam, but there are some similar problem other solvers.

If there is no file U in your solver : it's possible that the force calculating utility use a hard coded name of the velocity file. If you can compile on your machine, you can juste create a field U defined by U = Uabs. And then use the force function with this new field. It should work.

You may have to do the same with the pressure if there is no "p" field.
Aurelien Thinat is offline   Reply With Quote

Old   November 19, 2013, 15:48
Default
  #38
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
Hi dear Tobias,
I haven't worked with this solver,what are the fields it uses?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   November 20, 2013, 06:46
Smile Problem solved
  #39
Member
 
Tobias Adam
Join Date: Oct 2013
Location: Siegen
Posts: 55
Rep Power: 13
Tobias Adam is on a distinguished road
Thank you very much for your help!

The problem is resolved as I changed

Uname Urel; to
UName Urel;

I found the problem, after trying all different controll dict entries listed in the different threads for this problem (also on other websites).
Many posts include this error that only leads to problems if your velocity-field is not named "U".

@ Aurelien: This seems to be easier than craeting the new U field ;-). Nevertheless thank you very much for your help

@ Eshan: As far as I understood the question, it uses Urel for the data output in the output-file from the backround process and from this it generates the Folder Urel and Uabs in the time directory.
The rest is similar to SimpleFoam :-)

best regards
Tobias :-)
Tobias Adam is offline   Reply With Quote

Old   November 7, 2018, 19:12
Default Torque
  #40
New Member
 
José Yovany Galindo Díaz.
Join Date: Jun 2016
Posts: 2
Rep Power: 0
ozes is on a distinguished road
Hi Friends, Somebody can compilate the files of calculateTorque?
ozes 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
MRFSimpleFoam xdanielx OpenFOAM Running, Solving & CFD 0 December 17, 2008 02:28
dynamic mesh for rotating body Sumit FLUENT 0 September 14, 2008 07:07
Single Rotating Frame with MRFSimpleFoam david OpenFOAM Running, Solving & CFD 7 May 22, 2008 05:25
CHT with radiation and body is rotating harish kumar CFX 0 February 1, 2008 13:00
How can I create a rotating monitoring point? Andy Cong FLUENT 0 September 10, 2006 21:09


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