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

forces and moment in slosing tank

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 12, 2010, 11:20
Default forces and moment in slosing tank
  #1
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 42
Rep Power: 5
anmartin is on a distinguished road
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,
anmartin is online now   Reply With Quote

Old   February 18, 2010, 14:35
Default forces and moment in slosing tank
  #2
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 42
Rep Power: 5
anmartin is on a distinguished road

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
(Forces in V1.6)
that i will try

I will be very gratefully If someone can help me
Best regards,
anmartin is online now   Reply With Quote

Old   January 29, 2012, 19:10
Default reading pressure from files
  #3
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 138
Rep Power: 5
musahossein is on a distinguished road
Quote:
Originally Posted by anmartin View Post
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
(Forces in V1.6)
that i will try

I will be very gratefully If someone can help me
Best regards,
Did you ever solve this problem? I am running sloshingTank2d. I have modified the controlDict file as required so that at each time increment OpenFoam outputs phase and pressure. My confusion is, since for each displacement value in the 6DoF.dat file, OpenFoam generates a bunch of pressure and phase, do I take the last file that is output for a particular displacement as the correct one, or do we need to check for some kind of convergence? Any suggestions would be greatly appreciated, Thanks.
Musa
musahossein is offline   Reply With Quote

Old   January 30, 2012, 18:58
Default
  #4
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 42
Rep Power: 5
anmartin is on a distinguished road
Quote:
Originally Posted by musahossein View Post
Did you ever solve this problem? I am running sloshingTank2d. I have modified the controlDict file as required so that at each time increment OpenFoam outputs phase and pressure. My confusion is, since for each displacement value in the 6DoF.dat file, OpenFoam generates a bunch of pressure and phase, do I take the last file that is output for a particular displacement as the correct one, or do we need to check for some kind of convergence? Any suggestions would be greatly appreciated, Thanks.
Musa
Hello,

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
anmartin is online now   Reply With Quote

Old   February 3, 2012, 21:22
Default
  #5
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 138
Rep Power: 5
musahossein is on a distinguished road
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;
}
);
}
musahossein is offline   Reply With Quote

Old   February 4, 2012, 07:43
Default
  #6
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 42
Rep Power: 5
anmartin is on a distinguished road
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.
anmartin is online now   Reply With Quote

Old   February 4, 2012, 10:22
Default
  #7
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 138
Rep Power: 5
musahossein is on a distinguished road
Quote:
Originally Posted by anmartin View Post
Hello,

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
I copied the above into my controlDict file for sloshingTank2D. When I ran it, I got the following complaint in the log.interDyMFoam file as follows:

--> 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.
musahossein is offline   Reply With Quote

Old   February 4, 2012, 13:20
Default
  #8
Member
 
angel
Join Date: May 2009
Location: Spain
Posts: 42
Rep Power: 5
anmartin is on a distinguished road
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
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;

In RASProperites file
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel laminar;
turbulence off;
printCoeffs on;
As 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
anmartin is online now   Reply With Quote

Reply

Thread Tools
Display Modes

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


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


All times are GMT -4. The time now is 16:45.