CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   flow over cylinder (https://www.cfd-online.com/Forums/openfoam-pre-processing/176154-flow-over-cylinder.html)

bagherij August 11, 2016 19:04

flow over cylinder
 
1 Attachment(s)
Hi
i am working on flow past cylinder with Re=0 ,i attached geometry .there are no require set pressure boundary at AB and BC ,how can i implement it in 0/p?i set it as below but no working fine.please help


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];

internalField uniform 1;

boundaryField
{
left
{
type symmetryPlane;
}

right
{
type fixedValue;
value uniform 0;
}

down
{
type symmetryPlane;
}

up
{
type zeroGradient;
}

cylinder
{
type zeroGradient;
}

frontAndBack
{
type empty;
}
}


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
left
{
type symmetryPlane;

}

right
{

type fixedValue;
value uniform (0 1 0);
}

down
{
type symmetryPlane;

}

up
{
type fixedValue;
value uniform (0 1 0);
}

cylinder
{
type fixedValue;
value uniform (0 0 0);
}

frontAndBack
{
type empty;
}
}

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.2 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
p
{
solver GAMG;
tolerance 1e-6;
relTol 0;
smoother GaussSeidel;
nPreSweeps 2;
nPostSweeps 2;
cacheAgglomeration on;
agglomerator faceAreaPair;
nCellsInCoarsestLevel 10;
mergeLevels 1;
}

U
{
solver smoothSolver;
tolerance 1e-6;
relTol 0;
smoother GaussSeidel;
}
}

SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefPoint (2,0,0);
pRefCell 0;

residualControl
{
p 1e-3;
U 1e-4;
}
}

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.7;
}
}

HenningW August 12, 2016 08:35

Hi,

I am not sure what you mean by Re=0. So there is no flow at all?

Can please provide an error message or what exactly is not working?

HenningW August 12, 2016 08:45

On the right hand side you have a symmetry wall, yet you want a flow perpendicular to it? I do not think thats physically possible. Correct me if I am wrong, by in a symmetry plane the mass-flow should be 0 and thus the stream lines need to parallel to the surface, otherwise you have a line with mass constantly flowing in from both sides. Where is the fluid supposed to go without removing mass or compressing it to infinity?

bagherij August 12, 2016 11:47

2 Attachment(s)
Dear
there was some mistake in the picture,i changed it.
the flow is non-newtonnian (creeping flow like foams , filled polymer solution ) therefore re<<1, i attached the governing equations .the problem considered with two planes of symmetry, hence one quater of the domain is used,also i attached the all domain.
Thanks

Tobi August 13, 2016 04:50

Hi all,

  • first I did not check you first post because there are missing code-tags.
  • out of the last post, you have to implement a few stuff yourself.
  • I am not sure if eqn. 9 and 10 are correct (you should derive this yourself to be sure).
  • If the viscosity model is not implemented in foam, you have to implement it yourself.
  • based on your domain, you need to set the pRefValue in fvSolutions. Otherwise it will not work because you are not defining a well constrained problem.


Finally it is exact that one here: http://www.holzmann-cfd.de/index.php...gelumstroemung
But in your case it is a non-newtonian flow. Based on the tensors and fluid behaviors, maybe you are allowed to simplify the deviatoric stress tensor to get a Poisson equation but maybe it is not possible. Anyway (:

bagherij August 13, 2016 16:59

1 Attachment(s)
Dear Tobi
I attach the domain ,I dont want to apply pressure boundary condition at AB(up) and BC (right) ,how can i do it in the codes?

object p;

boundaryField
{
left
{
type symmetryPlane;
}

right
{
?????????????what should i write???
}

up
{
?????????????what should i write???
}
.
...

Tobi August 13, 2016 17:28

First guess,
  • right -> p :: zeroGradient
  • up -> p :: zeroGradient
set the refPressure close to the symmetry point and try.

PS: I am not sure if you can simplify the case in that way. It should be wrong if I think about it. You should have 2 symmetryPlanes but could it be that you have 3. ?


All times are GMT -4. The time now is 21:59.