CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   No Wall pressure from OpenFOAM 2.2.0 (http://www.cfd-online.com/Forums/openfoam-post-processing/115132-no-wall-pressure-openfoam-2-2-0-a.html)

musahossein March 24, 2013 16:55

No Wall pressure from OpenFOAM 2.2.0
 
Dear all:
I am running sloshing tank 2D in interDyMFoam. I have the following controlDict file to capture pressures from the left and right walls. In the previous version of OpenFOAM this ran without any problem and gave output. However since I have upgraded to OpenFOAM 2.2.0 and Ubuntu 12.10, it creates the time folders and the sub folders, but they are blank. Also I noted that whereas before the time folders were directly output to the sloshingTank2D directory, the output is now sent to a subfolder called "Post Processing". Any help in this regard would be greatly appreciated.

Thanks!
---------------------------------------------------------------------------------------------------------------------------
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application interDyMFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 4.00;

deltaT 0.001;

writeControl adjustableRunTime;

writeInterval 0.020;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression compressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.5;
maxAlphaCo 0.5;

maxDeltaT 1;

functions
{
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;
}
);

} // end functions

musahossein March 25, 2013 22:55

Post processing wont write at intervals in Controldict
 
Dear all;
Here is another question. I have set the writeinterval to 0.02. So shouldnt there be an output folder 0.02, 0.04..... etc? However, postprocessing only gives output at 0.1, 0.2 etc..Any ideas. Other than controldict, is there any other dictionary files where the interval needs to be modified or revised? I cant seem to find one.

Thanks

musahossein March 25, 2013 23:09

post processing pressure file does not occur at writeInterval in controlDict
 
I have the writeInterval in the controlDict file in solshingTank2d file set at 0.02. However, I do not get outputs at 0.02, 0.04, 0.06 etc - rather the files (post processing) are 0.1, 0.2, 0.3 etc. Can anyone tell me why this is happening? Thanks. The file is appended below. Does the outputInterval have anything to do with it? Thanks.

application interDyMFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 40;
//endTime 0.02;

//deltaT 0.01;
deltaT 0.001;

writeControl adjustableRunTime;

//writeInterval 0.05;
writeInterval 0.02;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression compressed;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.5;
maxAlphaCo 0.5;

maxDeltaT 1;

functions
{

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;
}
);

wyldckat April 1, 2013 12:45

Hi Musaddeque,

Since you didn't mention that you've made changes to the patches, then the reason for no values in the sub-folders of "postProcessing/wallPressure" is because the patches "leftWall" and "rightWall" do not exist.
You can confirm this by running:
Code:

patchSummary  -time 0
As for the time issue, it's simple:
  1. "writeInterval" is defined to "0.02".
  2. But in the function object you have:
    Code:

    outputInterval  5;
  3. 5*0.02 = 0.1 - which is the time interval you are getting in the output.
Best regards,
Bruno

musahossein April 4, 2013 19:05

Thankyou very much. I didnt realize that and thought they were two independent items.

musahossein July 25, 2013 08:15

Wallpressure computation in sampleDict
 
Dear all:

I am running sloshingTank2d in OpenFoam for a rectangular tank and the tank is partially filled with water. I am using sampleDict to obtain wall pressure. My question is the wall pressure values that I get, are they the pressure due to the water only? I cannot find documentation on how this quantity is calculated in OpenFOam. Any help will be appreciated. A segment of the sampledict output is provided below (X is in/out of the paper; Y is parallel to the paper and Z is vertically up. The origin is at the middle of the fluid phase and gas phase interface:

X Y Z alpha P
0 0.45 0.256061 0 99997.1
0 0.45 0.24596 0 99997.2
0 0.45 0.235859 0 99997.3
0 0.45 0.225758 0 99997.4
0 0.45 0.215657 0 99997.5
0 0.45 0.205556 2.38699e-308 99997.6
0 0.45 0.195455 1.16744e-297 99997.7
0 0.45 0.185354 1.98218e-285 99997.8
0 0.45 0.175253 4.45133e-264 99997.9
0 0.45 0.165152 1.63685e-243 99998
0 0.45 0.155051 1.3369e-223 99998.1

musahossein July 29, 2013 19:53

dynamic and static pressure
 
Dear all:

I have a question about how OpenFOAM calculates pressure. In the sloshingTank2D problem, if I sample the wall pressure - is the pressure the total pressure (dynamic + static) or only the dynamic pressure? How can I find out. Also if it is the total pressure then what can I do in the dictionary files to get the dynamic pressure only?

Suggestions will be greatly appreciated!

Thanks.

Musa

musahossein August 31, 2013 15:27

can inerdymfoam give static pressure?
 
Can anyone tell me if OpenFoam can provide static pressure at each point? I am running Openfoam 2.2.1 , interdymfoam, sloshingtank2d and trying to get pressure against the wall. Openfoam gives total pressure P from which I need to subtract pRef and also static pressure so I can get the dynamic pressure. Is there any way that the solver (interdymfoam) can give me the static pressure at each point where it outputs p?

Thanks

wyldckat August 31, 2013 15:33

Hi Musaddeque,

There is a function object that might help you, named "pressureTools": http://foam.sourceforge.net/docs/cpp...5.html#details

There is a thread on this topic here: http://www.cfd-online.com/Forums/ope...s-2-2-0-a.html
You'll have to read the whole thread, because the information is spread across various posts :(

Best regards,
Bruno

Junhong October 1, 2013 07:05

Hi Musaddeque,

I put the function (below) in controlDict, there is no data files produced in each folder (timestep). It works well in the earlier versions. Did you encounter such problem and how to solve it ?

Thanks!

Junhong

-----------------------------------------------------
left-wheel
{
type surfaces;
functionObjectLibs ( "libsampling.so" );
enabled true;
outputControl timeStep;
outputInterval 2;
surfaceFormat raw;
interpolationScheme cell;
fields
( p );
surfaces
(
left-wheel
{
type patch;
patches (left-wheel);
}
);
}
-----------------------------------------------

musahossein October 1, 2013 12:16

Your output interval is 2. what is your data write interval? since the output data is output interval * the data write interval, there may be a problem there. Check that.

Junhong October 1, 2013 14:08

Thanks!
the version 2.2.0_b2 used. same as the bug described
http://www.openfoam.org/mantisbt/view.php?id=813


startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 6.0;
deltaT 5e-6;
writeControl timeStep;
writeInterval 250;


type surfaces;
// Where to load it from
functionObjectLibs ( "libsampling.so" );
// Write at same frequency as fields
enabled true;
outputControl timeStep;
outputInterval 1;
surfaceFormat vtk; //vtk,raw,something else?
interpolationScheme cell;


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