CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Velocity output error after scaling mesh in icoFoam (http://www.cfd-online.com/Forums/openfoam-solving/59983-velocity-output-error-after-scaling-mesh-icofoam.html)

philippose October 7, 2006 13:03

Hello, I am simulating flow
 
Hello,
I am simulating flow of oil through a valve using icoFoam. The mesh consists of roughly 250,000 elements, and the points are defined in millimeter. It was created by importing an STL file from Pro-E into Netgen...meshing it, and then converting it using netgenNeutralToFoam.

While setting up the simulation, I used the utility function: transformPoints to scale the entire mesh by a factor of 0.001 in all the three axes, in order to convert it to metre.

In icoFoam I used a "Pressure Inlet" patch type at the Inlet side, and a "Pressure Inlet Outlet" patch type on the Outlet side, with all other boundaries defined as a wall.

The simulation was carried out with a time-step of 1.0e-07, with inlet pressure (600000/870), outlet pressure 0.0, and velocities being all zero.

When looking at the pressure and velocity distribution using ParaView, I found that for a delta P of 6 bar (fluid density 870 kg/m), though the theoretical velocity at steady state should be around 37m/s, the velocities recorded, are scaled down by a factor of 1000 (I see around 0.0300 in ParaView).

The dimension specified in the "U" file for each time step says [0 1 -1 0 0 0 0].

Is this normal? Or have I made a mistake somewhere while defining the simulation?

Thank you,

Philippose

gschaider October 9, 2006 10:17

Hi Philippose! I can't comm
 
Hi Philippose!

I can't comment on the case itself, but did you scale the viscosity too (you did it with the pressure)?

philippose October 9, 2006 11:39

Hello Bernhard, The kinemat
 
Hello Bernhard,
The kinematic viscosity, has dimensions of m^2/s... It is already normalised with respect to density, because dynamic viscosity divided by the density of the medium gives you kinematic viscosity... hence, no special scaling is required for the viscosity.

icoFoam... being an "incompressible" transient solver, works with values normalised with respect to density, and one does not need to explicitly provide a density value.

I work with HLP-46 hydraulic oil which has a kinematic viscosity of 46cSt at 40 deg C.

46 cSt = 46e-6 m^2/s.... this converted value was used in the simulation.

On the other hand, yesterday I did a steady state analysis of the same case with "simpleFoam"... and I got a steady state velocity of around 40 m/s... which seems to be correct.

I need to look into the boundary conditions again I guess.

Thank you very much for the response :-)

Have a nice day!

Philippose

gschaider October 9, 2006 13:29

Hi Philippose! Sorry for a
 
Hi Philippose!

Sorry for asking the obvious (just because I tend to forget to calculate the kinematic viscosity doesn't mean other people do), but I'm doing it again: you've provided us with a lot of info about your case, but what is missing is: how many timesteps did you calculate before post-processing?

philippose October 9, 2006 16:51

Hello again, Here comes th
 
Hello again,
Here comes the problematic part :-)

The case itself.... is the internal fluid flow path of a valve, which has an inlet side, and an outlet side, which are perpendicular to each other, with a set of 6 holes radially leading from the inlet region to the outlet region.

I maintain a contant pressure at the inlet (6 bar) and outlet (1 bar.. tank), and want to know the pressure distribution, velocity distribution, and eventually (much later)... the forces on the spool for example.

The simulation was run using the icoFoam solver, with the following parameters:

---- fvSolution -----
solvers
{
p ICCG 1e-06 0;
U BICCG 1e-05 0;
}

PISO
{
momentumPredictor yes;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
}

---- fvSchemes ----

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear corrected;
laplacian(1|A(U),p) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}

---- the "p" file in folder 0 ----

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
fixedWalls
{
type zeroGradient;
}

inletSide
{
type fixedValue;
value uniform 689.655;
}

outletSide
{
type fixedValue;
value uniform 0;
}
}

---- the "U" folder in 0 ----

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}

inletSide
{
type pressureInletVelocity;
value uniform (0 0 0);
}

outletSide
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
}

----- "boundary" file -----

(
fixedWalls
{
type wall;
physicalType wall;
startFace 382936;
nFaces 38776;
}

inletSide
{
type patch;
physicalType pressureInlet;
startFace 421712;
nFaces 108;
}

outletSide
{
type patch;
physicalType pressureInletOutlet;
startFace 421820;
nFaces 108;
}
)

--------------------------------------------

I ran this simulation with a time step size of 1e-07, from 0 to 1.3e-6 seconds.

From 1e-6 onwards, the Courant Number started rising very fast, and I stopped the simulation. However, when looking at the output in ParaViewer, I find that the pressure distribution seems to be ok, but the velocity seems to be too small.

I know it might be a problem with the fact that I have run the simulation only for 13 iterations.... but the fact that the pressure converged so fast, and that the velocity distribution seems to be fine, except for the magnitudes prompted me to raise this doubt.

Anyway, I shall spend more time on it.... I have been looking at the forum, and found an inlet boundary condition "pressureInletVelocity", which seems to be the inlet condition I need to choose, since I know only the pressure and not the velocity at the inlet.

Moreover, there were suggestions in other messages about using the AMG solver for pressure, and the Gauss linear limited interpolation scheme for the Laplacian.

Thanks again for the interest in my case... :-)

Philippose


All times are GMT -4. The time now is 11:51.