|
[Sponsors] |
February 12, 2010, 11:20 |
forces and moment in slosing tank
|
#1 |
Member
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 17 |
Hi to everybody
I’m trying to simulate sloshing inside a tank. The tank is excited laterally (Y) with a SKA (6DoF.dat) function that represent a sinusoidal excitation. I would like to obtain the lateral and vertical forces and moment around X axis produced by the water inside to be compared with experimental data. I will be very gratefully If someone can help me Best regards, |
|
February 18, 2010, 14:35 |
forces and moment in slosing tank
|
#2 |
Member
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 17 |
I guess my posts must be really stupid, since they seem to never get answered. Well, I am fully aware that OpenFOAM is open-source and that all replies and support is voluntarily and that of course nobody has any right to his or her problems being answered. Still, I was hoping to get some support, especially since I am actually trying to validate OpenFOAM against some experimental data. I have done many test with differents tanks sections excitate with a sinusoidal displacement in orden to optain a mechanical analogy that can be incorporate in an truck model, and now i will like to finish my phd thesis, with a foam simulation to completed the work done. I have triyed to use interFoamPressure, but i have several error: a)readEnvironmentalProperties.H is not present (It is possible to get from OF1.5) b) -llduSolvers is not present (i have comment it in the file) and the compiled with wmake c) when run interFoamPressure appears: Not all fields are present. pd gamma missing. Anyway, I have read in the forum some cases where it is possible to obtain the forces by adding some functions at the end of the controlDict (http://www.cfd-online.com/Forums/ope...es-v1-6-a.html) that i will try I will be very gratefully If someone can help me Best regards, |
|
January 29, 2012, 19:10 |
reading pressure from files
|
#3 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
Musa |
||
January 30, 2012, 18:58 |
|
#4 | |
Member
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 17 |
Quote:
I put this lines in my controldict and works perfectly. functions { forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (walls); rhoName rhoInf; rhoInf 998.2; //Reference density for fluid CofR (0 -0.071 0.25); //Origin for moment calculations outputControl outputTime; } } You only need to set on turbulence and printCoeffs in constant/RASProperties RASModel laminar; //or any other type of turbulence turbulence on; printCoeffs on; best regards |
||
February 3, 2012, 21:22 |
|
#5 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
how can you tell if the force is from your fluid or atmosphere. I have done something similar in controldict, where I have openfoam ouput alpha (phase value) and the pressure. Now I have to write a code that will only give me the pressures from cells that have a phase less than zero, since I am interested in obtaining fluid pressures only on the left and right walls of a tank. My code in control dict is as follows:
wallPressure { type surfaces; functionObjectLibs ("libsampling.so"); outputControl outputTime; outputInterval 5; surfaceFormat raw; interpolationScheme cell; fields ( alpha1 p ); surfaces ( leftwalls { type patch; patches (leftWall); interpolate true; triangulate false; } rightwalls { type patch; patches (rightWall); interpolate true; triangulate false; } ); } |
|
February 4, 2012, 07:43 |
|
#6 |
Member
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 17 |
Hello,
In my case forces are for both air (alpha 0-0.5) and water (alpha>0.5). Try to multiply cell value by alpha. With swak4foam wold be possible to do something similar. In my controldict i fix write interval to 0.025 then with outputTime i obtain a force value every that time to compare with experimental data. You have one more line fixed outputinterval to 5. |
|
February 4, 2012, 10:22 |
|
#7 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
--> FOAM FATAL IO ERROR: keyword nu is undefined in dictionary "/home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/transportProperties" file: /home/musa/OpenFOAM/musa-2.0.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/transportProperties from line 23 to line 35. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. FOAM exiting But I have defined nu in the transport properties file as follows: object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Phase1 is water; phase2 is air. Values for Standard Temperature and pressure (0 deg C, 14.69 psi // or 101.325 kPa, ) in accordance with NIST // phase1 { transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1e-06; rho rho [ 1 -3 0 0 0 0 0 ] 998.2; } phase2 { transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1.50e-05; rho rho [ 1 -3 0 0 0 0 0 ] 1.2; } sigma sigma [ 1 0 -2 0 0 0 0 ] 0; // ************************************************** *********************** // I have set turbulence as laminar as I am not expecting any wave breaking or huge amount of sloshing. Could that be the problem? Any advice would be greatly appreciated. |
||
February 4, 2012, 13:20 |
|
#8 |
Member
angel
Join Date: May 2009
Location: Spain
Posts: 46
Rep Power: 17 |
Hello,
libforces need to set any turbulence model, but in OF tutorial appears that laminar is a dummy turbulence model, then you only need to set on turbulence properliey: In tubulenceProperites file FoamFileIn RASProperites file FoamFileAs I mentioned you in the previously, set on printCoeffs in constant/RASProperties and RASModel laminar; //or any other type of turbulence turbulence on; printCoeffs on; best regards |
|
August 5, 2013, 10:22 |
|
#9 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 12 |
Dear all,
I add this section in my controlDict: functions ( forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load patches (stlSurface_ascii); // change to your patch name pName p; Uname U; rhoName rho; rhoInf 1.225; //Reference density for fluid CofR (0 0 0); //Origin for moment calculations outputControl timeStep; outputInterval 1; } ); but I still don't know how to visualize the force or moment in paraview? Could you help me ? Best regards, Mina |
|
August 5, 2013, 10:29 |
|
#10 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
As far as I know, paraview can only work with data that has been written to disk and forcesCoeffs-functionObject doesn't write it to disk so you many not be able to visualize the forces. At least I have not seen that functionality in paraView. If you find a solution, let me know.
|
|
August 5, 2013, 10:33 |
|
#11 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 12 |
Dear musaddeque hossein,
So, do you have another solution to calculate the average force or moment on a surface ? I know well that the pressure is distrubed on a surface but i want an average value for a force & where can be this average force located? Is it possible using OF and paraView? Best regards, Mina |
|
August 5, 2013, 10:41 |
|
#12 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
One thing you can do is to write a script or code (I use fortran) that can read the pressure files that OF generates and then compile the forces from there. I have done that, but only for pressures in sloshingTand2D problem to capture the forces against the walls of the tank.
|
|
August 5, 2013, 10:44 |
|
#13 |
New Member
Basta
Join Date: Jul 2013
Posts: 28
Rep Power: 12 |
Thanks a lot but I read something in http://www.cfd-online.com/Forums/ope...-parafoam.html
What do you think ? |
|
August 5, 2013, 10:50 |
|
#14 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
You can try the steps that were outlined. But if you know some programming, then instead of doing each step manually as the poster has stated, you can run your code and generate the data you seek.
|
|
August 27, 2013, 17:43 |
|
#15 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
|
||
August 29, 2013, 08:31 |
output from libforces.so
|
#16 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Dear all:
I have the following code in controlDict for sloshingtank2D in Interdymfoam: forces { type forces; functionObjectLibs ("libforces.so"); //Lib to load outputControl outputTime; patches (leftWall rightWall); pName p; UName U; rhoName rhoInf; rhoInf 998.2; //Reference density for fluid nuInf 1e-06; CofR (0 0 0); //Origin for moment calculations outputControl timeStep; outputInterval 1; } The output is shown below. Looking at the output, there seems to be only 1 value for force for each time. But in controldict I specified the leftwall and rightwall -- so there should be two force outputs? Can anyone clarify this for me? Thankyou. # Time forces(pressure, viscous, porous) moment(pressure, viscous, porous) 0.00116279 ((0 6.80759 0),(1.97145e-16 0.000111794 4.4025e-08),(0 0 0)) ((1.61118 0 0),(2.07113e-05 9.32239e-17 -4.15186e-17),(0 0 0)) 0.00251938 ((0 12.3413 0),(3.27553e-17 0.00033949 -5.79995e-07),(0 0 0)) ((2.92001 0 0),(6.70143e-05 2.88232e-17 5.96196e-17),(0 0 0)) 0.00410207 ((0 11.8477 0),(-1.40002e-16 0.000578923 -8.757e-07),(0 0 0)) ((2.80189 0 0),(0.000123266 -3.9136e-17 -6.36765e-17),(0 0 0)) 0.00593798 ((0 11.2883 0),(8.41123e-17 0.000831158 -7.59491e-07),(0 0 0)) ((2.66847 0 0),(0.00018915 3.28012e-17 1.44194e-16),(0 0 0)) 0.00814109 ((0 10.42 0),(-2.99483e-16 0.00110036 -1.08114e-06),(0 0 0)) ((2.46207 0 0),(0.000264889 -1.0025e-16 -6.09408e-17),(0 0 0)) |
|
August 30, 2013, 22:47 |
|
#17 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
For those who are interested, the force in the first parenthesis is the resultant force. So the resultant does not have to be computed from the leftwall and rightwall force.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Forces calulated through pressure | LVDH | OpenFOAM Post-Processing | 2 | February 26, 2010 03:15 |
Extracting the different Two Phase forces | challenger85 | CFX | 3 | February 3, 2010 04:00 |
Problems With Journal When Writing Forces To File | Andrew | FLUENT | 2 | September 23, 2005 02:12 |
CEL Function for moment acting on a BC? | NymphadoraTonks | CFX | 4 | November 10, 2004 17:01 |
viscous moment | Thierry | FLUENT | 0 | April 8, 2003 05:43 |