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/)
-   -   Error due to Unstructured Mesh with custom solver (http://www.cfd-online.com/Forums/openfoam-solving/113581-error-due-unstructured-mesh-custom-solver.html)

fredo490 February 22, 2013 08:11

Error due to Unstructured Mesh with custom solver
 
Edit, problem solved

Dear all,

I'm facing some issues with unstructured Mesh (quality is ok and Skewness is less than 0.45) with my custom solver. My "density variable" has some strange error lines that follows the flow streamlines as shown bellow. The picture shows the normalized density (1 is the freestream value) when the case reaches steadyness. I tried different scheme, the linearUpwindV scheme improve/smooth a little the results but it's not perfect yet.

My case computes the behavior of highly dispersed particles in a fluid (only the fluid impact the particles motion through the drag) using an Eulerian approach. The goal is to compute the particles collection over a cylinder (some particles impact the cylinder and some are moved away by the air flow via drag)
http://www.fredo490.fr/1ordre[640x480].pnghttp://www.fredo490.fr/2ordre-milieu[640x480].png

My solver:
An unsteady Eulerian solver to compute the behavior of highly dispersed tiny particles in a fluid (only the fluid impact the particles motion through the drag).

Nomenclature :
- \alpha volume fraction of the particles
- \vec{u} velocity of the particles
- f(Re) function of the relative Reynolds number
- \tau time respond of the particle
- \vec{V} velocity of the fluid


Continuity equation :
\frac{\partial \alpha}{\partial t} + {\nabla \alpha \vec{u}} = 0

Momentum equation
\frac{\partial \alpha \vec{u}}{\partial t} + {\nabla \alpha \vec{u} \vec{u}} = \frac{f(Re)}{\tau } \alpha (\vec{V} -\vec{u})

My scheme
Code:

ddtSchemes
{
    default        backward;
}

divSchemes
{
    default        no;
    div(phiR,U)    Gauss linearUpwind grad(U);
    div(phi,rho)    Gauss upwind grad(rho);
}

gradSchemes
{
    default        Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear;
}

interpolationSchemes
{
    default linear;
}

snGradSchemes
{
    default        fourth;
}

fluxRequired
{
    default        no;
    rho              ;
}

EDIT: I've found a solution
To solve my problem, I used a skewCorrected

My new fvSchemes is:
Code:

ddtSchemes
{
    default        backward;
}

divSchemes
{
    default        no;
    div(phiR,U)    Gauss skewCorrected linearUpwind grad(U);
    div(phi,rho)    Gauss skewCorrected upwind grad(rho);
}

gradSchemes
{
    default        Gauss linear;
}

laplacianSchemes
{
    default        Gauss linear;
}

interpolationSchemes
{
    default linear;
}

snGradSchemes
{
    default        fourth;
}

fluxRequired
{
    default        no;
    rho              ;
}


fredo490 February 23, 2013 04:04

I've checked my problem with a structured grid having the same y+ and the small disturbances are gone... The problem is linked to the unstructured but I cannot find any scheme able to smooth/correct those errors.

sharonyue March 6, 2015 03:46

Hello HECKMANN!

Could u pls upload a comparison of contour plot of the right result? Using skewCorrected scheme.

Thanks.


All times are GMT -4. The time now is 17:55.