CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Strange torque calculation (http://www.cfd-online.com/Forums/openfoam-solving/115231-strange-torque-calculation.html)

 danny123 March 26, 2013 12:54

Strange torque calculation

1 Attachment(s)
Hello,

I have trouble calculating the shaft torque of a mixer. The problem can be illustrated on the mixerVesselAMI2D tutorial example, though appears on more complex geometries as well.

In order to reproduce, the error, I did the following:

- in ControlDic file I added the following lines for the torque calculation:

libs ("libforces.so");

functions
{
forces
{
type forces;
functionObjectLibs ("libforces.so");
patches (rotor);
rhoName rhoInf;
rhoInf 1.0; // meaning that you need to multiply result with your assumed density in kg/m3 in order to get N m
CofR (0 0 0.001); //Origin for moment calculations
outputControl outputTime;
outputInterval 1;
}
}

Then I altered transportProperties:

transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 300;

This means a high viscous fluid as I intend to simulate. You can use a Cross model too, has the same effect.

In decomposeParDict, I changed the number of processors to the number I have:

numberOfSubdomains 6;

The I did run it using mpi. This example did not work, meaning it did not converge. The calculation did hang at 0.0046 s calculated time and did only minor progress over time.

I then changed relaxation in U by manipulating the fvSolution file:

relaxationFactors
{
fields
{
}
equations
{
"U.*" 0.1;
}
}

This example did work. I did then the calculation again using 0.6.

The attached graph shows the z axis torque value. As one can see, the results differ significantly.

An additional hint: I have computed another example of a vessel with no baffels. In this case, using the Cross model, I get a realistic end values since there are no fluctuating forces (due to baffels). However the starting value (0.1 s) and the slope to the end value differ significantly depending on which relaxation I use.

My question:

Does this make sense? I think relaxation should not affect end results, but convergence only. Is this a known issue? My impression is that one of the iteration routines uses delta result to stop iteration instead of functional value (e.g. f(x_n) < small error).

Needless to say that I want to use this model for a vessel having interactions between agitator and wall mounted elements. Fluctuations of torque are therefore to be expected.

Regards,

Daniel

 danny123 April 8, 2013 08:29

Well, is there anybody who could help?

 sharonyue May 3, 2013 05:31

rhoInf 1.0; // meaning that you need to multiply result with your assumed density in kg/m3 in order to get N m

If it was water, isnt should be 1000 kg/m3?

 danny123 May 3, 2013 05:50

Hello Sharonyue,

Yes, since this is an incompressible solver (pimpleDymFoam), calculation is independent on rho, or in other words: all calculated forces (including pressure) divided by rho have an identical solution.

Same applies for pressure: you need to multiply all values by rho to get standard pressure units such as Pa. Unit for p in OpenFoam is m/s2.

Regards,

Daniel

 sharonyue May 3, 2013 08:43

1 Attachment(s)
Quote:
 Originally Posted by danny123 (Post 424908) Hello Sharonyue, Yes, since this is an incompressible solver (pimpleDymFoam), calculation is independent on rho, or in other words: all calculated forces (including pressure) divided by rho have an identical solution. Same applies for pressure: you need to multiply all values by rho to get standard pressure units such as Pa. Unit for p in OpenFoam is m/s2. Regards, Daniel

And recently I dont what is
Code:

```forces output:     forces(pressure,viscous)((0.00051958 0.0147229 0.00888238),(2.90942e-06 5.08649e-05 3.66205e-05))     moment(pressure,viscous)((0.00126819 0.0125252 -0.000689063),(5.24538e-06 0.000217766 -4.13516e-07)) forces output:     forces(pressure,viscous)((6.74375 -2.82417 0.100704),(0.0712743 0.0515865 4.79054e-05))     moment(pressure,viscous)((-1.25676 11.7464 -1.95008),(0.000493901 0.212057 -0.0206164))```
If you know how to caculate torque from forces and moment above , can you send me one copy of this paper...Thanks..

With respect to my case. In my rotate region,there are some impellers and shaft. I want to sum the torque.How can I do this?
Code:

```functions (     forces     {         type forces;         functionObjectLibs ("libforces.so");         outputControl timeStep;         outputInterval 1;         patches (intermigOpposite1); //        pname p; //        Uname U;         rhoName rhoInf;         log true;         rhoInf 1;         CofR (0 0 0);     }     forces     {         type forces;         functionObjectLibs ("libforces.so");         outputControl timeStep;         outputInterval 1;         patches (intermigOpposite2); //        pname p; //        Uname U;         rhoName rhoInf;         log true;         rhoInf 1000;         CofR (0 0 0);     } );```
If I do this I get this force:You can see, if I set rhoinf equals 1, forces is very small...

Code:

```Time = 1 smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.0379456, No Iterations 2 smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0415732, No Iterations 2 smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.0373845, No Iterations 2 GAMG:  Solving for p, Initial residual = 1, Final residual = 0.022438, No Iterations 4 time step continuity errors : sum local = 0.0245985, global = -0.000187204, cumulative = -0.000187204 smoothSolver:  Solving for epsilon, Initial residual = 0.0171788, Final residual = 0.000698452, No Iterations 2 smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.0594072, No Iterations 2 ExecutionTime = 3.78 s  ClockTime = 4 s forces output:     forces(pressure,viscous)((0.00051958 0.0147229 0.00888238),(2.90942e-06 5.08649e-05 3.66205e-05))     moment(pressure,viscous)((0.00126819 0.0125252 -0.000689063),(5.24538e-06 0.000217766 -4.13516e-07)) forces output:     forces(pressure,viscous)((6.74375 -2.82417 0.100704),(0.0712743 0.0515865 4.79054e-05))     moment(pressure,viscous)((-1.25676 11.7464 -1.95008),(0.000493901 0.212057 -0.0206164)) Time = 2 smoothSolver:  Solving for Ux, Initial residual = 0.380787, Final residual = 0.0263685, No Iterations 2 smoothSolver:  Solving for Uy, Initial residual = 0.412109, Final residual = 0.0303217, No Iterations 2 smoothSolver:  Solving for Uz, Initial residual = 0.378045, Final residual = 0.0262647, No Iterations 2 GAMG:  Solving for p, Initial residual = 0.528525, Final residual = 0.0230284, No Iterations 2 time step continuity errors : sum local = 0.0524121, global = -0.000252962, cumulative = -0.000440166 smoothSolver:  Solving for epsilon, Initial residual = 0.00769558, Final residual = 0.000398045, No Iterations 2 smoothSolver:  Solving for k, Initial residual = 0.496703, Final residual = 0.031422, No Iterations 2 ExecutionTime = 4.82 s  ClockTime = 5 s forces output:     forces(pressure,viscous)((0.000393629 0.0317798 0.00821695),(1.65936e-06 0.000123852 1.8138e-05))     moment(pressure,viscous)((0.00117917 0.0131713 -0.000683864),(2.70442e-06 0.000176286 -2.73168e-07)) forces output:     forces(pressure,viscous)((6.03098 10.3858 0.232051),(0.0636204 0.133908 -0.00205265))     moment(pressure,viscous)((-1.16306 12.4768 -1.74162),(0.00196689 0.178463 -0.0184375)) Time = 3 smoothSolver:  Solving for Ux, Initial residual = 0.218081, Final residual = 0.0140768, No Iterations 2 smoothSolver:  Solving for Uy, Initial residual = 0.231706, Final residual = 0.0153347, No Iterations 2 smoothSolver:  Solving for Uz, Initial residual = 0.210506, Final residual = 0.0137342, No Iterations 2 GAMG:  Solving for p, Initial residual = 0.536728, Final residual = 0.0207522, No Iterations 2 time step continuity errors : sum local = 0.0564933, global = -0.000311603, cumulative = -0.000751769 smoothSolver:  Solving for epsilon, Initial residual = 0.00802927, Final residual = 0.000447798, No Iterations 2 smoothSolver:  Solving for k, Initial residual = 0.225561, Final residual = 0.0161636, No Iterations 2 ExecutionTime = 5.71 s  ClockTime = 6 s forces output:     forces(pressure,viscous)((0.000113223 0.040075 0.00594884),(-1.00298e-06 0.00014986 5.89622e-06))     moment(pressure,viscous)((0.000862303 0.0104936 -0.000454219),(1.06171e-06 0.000147677 -1.23476e-07)) forces output:     forces(pressure,viscous)((3.71494 22.8188 0.526035),(0.0611471 0.168738 -0.00218464))     moment(pressure,viscous)((-0.601525 9.87803 -1.07241),(0.00321426 0.156793 -0.017775))```
and If I add all the patches into "patch(mypatch1 mypatch2)",looks like it cannot work.

 danny123 May 7, 2013 04:59

Hello Sharonyue,

What I figured is that the output of "forces" is the following:

- the left column is obviously the time scale
- the next 3 columns are the forces, which act in CofR
- the next 3 columns are the moments, which act in CofR

The patch should be the one in rotation (I guess that is what is on your picture), but I would think the stator may work as well). The axis of rotation should cross CofR. Since one of the Cartesian axis is the axis of rotation (defined in dynamicMeshDic) then you should be able to identify the drive torque (moment in direction of the axis of rotation) and the 2 bending moments in the plane perpendicular to the axis of rotation.

If your rotor protrudes the stator only on one side, you should define CofR being in the plane where it protrudes. If it protrudes on both sides you need the calculation on both ends. The net torque then is the difference between the 2 and the actual torque on both ends depends on your drive motor situation (which OpenFoam cannot know).

Regards,

Daniel

Hope that helps,

Daniel

 All times are GMT -4. The time now is 12:53.