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/)
-   -   Urban scenario - tetra vs hex problem (http://www.cfd-online.com/Forums/openfoam-solving/63145-urban-scenario-tetra-vs-hex-problem.html)

pablocg March 30, 2009 14:05

Urban scenario - tetra vs hex problem
 
Hello all!

I've been trying to run some cases of airflow around buildings using simpleFoam.

Simulations seem to converge fine when using a hexahedral mesh. However, if I try the same case but with a tetrahedral mesh, I get fast increasing time step continuity and bounding epsilon errors.

Any suggestions?

Right now I'm trying increasing numbers of Non Orthogonal Correctors, but without much success. My checkMesh results showed

Mesh non-orthogonality Max: 65.5343 average: 19.5644
Non-orthogonality check OK.

Should I be using such correctors for this? And how many? Is there some simple way of determining the number of correctors based on the mesh non-orthogonality? Or is my problem something else entirely?

Thanks,

-Pablo

zhoubinwx March 30, 2009 14:20

Hi Pablo,

I have some experience with coarse mesh on uniform flow around a cylinder. Here I use very coarse mesh(because I want to use the converged results as initial condition for my fine-mesh test case). After the residual for p and U is of order 10^(-6), I see increasing time step continuity and bounding epsilon errors afterwards. But when I use fine mesh I have no such phenomena.

Therefore, may I suggest to use fine mesh? Of course there maybe other reasons. Other friends could give you good suggestions:)

Bin

sega March 30, 2009 15:01

Quote:

Originally Posted by pablocg (Post 211304)
Is there some simple way of determining the number of correctors based on the mesh non-orthogonality?

Let me highlight this question. Although I have no answer to this question it can be of highly practical interest for all of us using tetrahedral mesh!

pablocg April 1, 2009 10:41

Still haven't managed to get this to run properly with tetrahedral.
I did refine the mesh around the building (testing with just 1 at the moment), but my time step continuity error goes to E+30 within 3-4 steps.
Any other ideas?
Thanks.

matejfor April 2, 2009 04:46

Hi,
Just to make sure, do you have some prism layer in your tet mesh?
What BC you have for epsilon and k at inlet? Are they realistic? and initial condition? You may try mapFields from the hex mesh to tet and see if it is able to continue from a good solution field with tetmesh. How does your fvSchemes look like?

matej

pablocg April 6, 2009 11:39

Quote:

Originally Posted by matejfor (Post 211690)
Hi,
Just to make sure, do you have some prism layer in your tet mesh?

I'm not sure, think not... Am using GAMBIT size functions and Tet/Hybrid elements. To be honest, I hadn't heard of such issue before...

Quote:

Originally Posted by matejfor (Post 211690)
What BC you have for epsilon and k at inlet? Are they realistic? and initial condition?

These are fine. U, k and epsilon are based on the following equations:

Uinlet == ufric*log((z+z0)/(Ka*z0)) * vector(1,0,0);
kinlet == ufric2/::sqrt(0.09);
epsiloninlet == ufric2*ufric/(Ka * (z+z0));

Quote:

Originally Posted by matejfor (Post 211690)
You may try mapFields from the hex mesh to tet and see if it is able to continue from a good solution field with tetmesh.

No, havent tried this yet.

Quote:

Originally Posted by matejfor (Post 211690)
How does your fvSchemes look like?

matej

I'm using pretty much the simplest schemes for now, until I can get it to run properly so I can try to refine it:

ddtSchemes
{
default steadyState;
}

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

divSchemes
{
default none;
div(phi,U) Gauss upwind;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

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

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}


Any help/ideas/suggestions are appreciated.
Thanks,
-Pablo

matejfor April 9, 2009 04:14

Hi,
by prism layer I mean a layer of typically prism-shaped elements in the boundary region for the BL better description. But your problem is not a quality of the solution but the existence of it.

What you may try is some limiting off the convection terms, something like:
div(phi,U) Gauss UpwindV cellLimited leastSquares 1.0;
or maybe 0.5.

My problem with divergence of epsilon and continuity is typically wrong BC setting, mainly of k and epsilon at inlet. I recall someone here recently suggesting setting epsilon for the initial condition 10 times higher then that of the inlet.

good luck
matej


All times are GMT -4. The time now is 19:43.