CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Problem with boundary conditions (heatTransfer)

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By zhengzh5

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2014, 19:44
Default Problem with boundary conditions (heatTransfer)
  #1
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
Hi there,

i'm new at this forum and also realtively new to OpenFoam.

So here is my Problem:
I want to solve a HeatTransfer problem, i want to examine the cooling of a cylinder in a wind tunnel.

I have a .stl file of the cylinder and my wind tunnel is a hexagon made in the blockMeshdict. I used snappyHexMesh for the .stl file.

Now i have the boundaries of the wind tunnel with the walls and the inlet and outlet as well as the boundaries windtunnel_to_cylinder and cylinder_to_windtunnel.

First of all i only want to look at the cooling, without any turbulence models, so i set the turbulence to off. My Problem now is by using the chtMultiRegionFoam solver, that the temperature of the cylinder isn't changing.

I think, that i don't set the boundary conditions for the temperature right. So here are the initial value files for the temperature of the wind tunnel and the cylinder.

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
//Cylinder

dimensions      [ 0 0 0 1 0 0 0 ];

internalField   uniform 500;

boundaryField
{
    cylinder_to_windtunnel
    {
        type            fixedValue;
        value           uniform 500;
    }
}


// ************************************************************************* //
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 
//Windtunnel

dimensions      [ 0 0 0 1 0 0 0 ];

internalField   uniform 300;

boundaryField
{
    "(inlet|upperWall|lowerWall|frontWall|backWall)"
    {
        type        fixedValue;
        value        uniform 300;
    }

    windtunnel_to_cylinder
    {
        type            fixedValue;
        value           uniform 300;
    }

    outlet
    {
        type            zeroGradient:
    }
}


// ************************************************************************* //
Thanks for help!

greetings
Wirman
Wirman is offline   Reply With Quote

Old   November 24, 2014, 02:46
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Hi,
you should make a sketch of your setup where you show all boundaries with their names. What means windtunnel_to_cylinder and cylinder_to_windtunnel?

So there is a cylinder inside your wind tunnel, and cool air flows around that cylinder? Do you resolve the solid body (cylinder) with a mesh and solve for heat conduction in the solid?

From what I can guess with the few information: Yes, your boundary conditions seem to be wrong. You have two general possibilities: 1) Fix the temperature at the surface. This means that the simulation can not change the temperature because it is a boundary condition for all time. Even with the highest cooling it will not change. This is what I think what happens here, because your cylinder seems to have a fixed temperature boundary condition. But: The heat flux inside / outside the cylinder can change. This is the temperature gradient at the surface.
2) Fix the gradient of the temperature. If you set the heat flux to zero that means, that your body will heat (or cool) until it gets the temperature of the surrounding fluid.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 04:53
Default
  #3
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
Hi,

thanks for your response. Sorry for being a bit vague, so here are some explanations. As an attachement i made a little image of my model in 2D, front and back Walls are the 3D-case and the cylinder doesn't touches the front and the back wall (so it is complete in the wind tunnel, without touching any walls)

In the .stl file of the cylinder i have only one region, named cylinder_to_windtunnel (so the points in the .stl file are all boundary points of the cylinder) - i think it could be a problem that there are no inner nodes?!? -

this .stl file will be meshed with snappyHexMesh out of the blockMesh from the wind tunnel. I made the same with the wind tunnel to set up the wind tunnel without the cylinder. So i have the following boundaries in the polyMesh folders of Windtunnel and Cylinder:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// boundary Windtunnel
7
(
    inlet
    {
        type            patch;
        nFaces          100;
        startFace       207208;
    }
    outlet
    {
        type            patch;
        nFaces          100;
        startFace       207308;
    }
    lowerWall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          200;
        startFace       207408;
    }
    upperWall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          200;
        startFace       207608;
    }
    frontWall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          224;
        startFace       207808;
    }
    backWall
    {
        type            wall;
        inGroups        1(wall);
        nFaces          224;
        startFace       208032;
    }
    windtunnel_to_cylinder
    {
        type            wall;
        inGroups        1(wall);
        nFaces          15625;
        startFace       208256;
	sampleMode      nearestPatchFace;
    	sampleRegion   cylinder;
    	samplePatch     cylinder_to_windtunnel;
    }
)

// ************************************************************************* //
and

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// boundary cylinder
1
(

    cylinder_to_windtunnel
    {
        type            wall;
        inGroups        1(wall);
        nFaces          15856;
        startFace       63660;
	sampleMode      nearestPatchFace;
    	sampleRegion    windtunnel;
    	samplePatch     windtunnel_to_cylinder;
    }
)

// ************************************************************************* //
After that i set the boundary conditions like in my first post.
I see the point with the fixed Value, so i tried to change the boundary conditions to fixedGradient. So my new 0/cylinder/T file is the following:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 0 0 1 0 0 0 ];

internalField   uniform 500;

boundaryField
{
    cylinder_to_windtunnel
    {
        type            fixedGradient;
	gradient			uniform 0;
    }
}


// ************************************************************************* //
But that changes unfortunately nothing.

So here is a snapshot what chtMultiRegionFoam does:

Code:
Solving for fluid region windtunnel
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.1691079, Final residual = 7.164976e-08, No Iterations 28
DILUPBiCG:  Solving for Uy, Initial residual = 0.1495004, Final residual = 5.141199e-08, No Iterations 28
DILUPBiCG:  Solving for Uz, Initial residual = 0.1496348, Final residual = 1.371065e-08, No Iterations 30
DILUPBiCG:  Solving for h, Initial residual = 0.1502954, Final residual = 5.238185e-08, No Iterations 29
Min/max T:44.85127 776.2719
GAMG:  Solving for p_rgh, Initial residual = 0.06935177, Final residual = 0.0003099182, No Iterations 5
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 7.980175e-05, global = -2.0367e-05, cumulative = -0.0003824869
GAMG:  Solving for p_rgh, Initial residual = 0.06477691, Final residual = 6.725581e-08, No Iterations 14
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 8.454755e-09, global = 2.64765e-09, cumulative = -0.0003824843

Solving for solid region cylinder
DICPCG:  Solving for h, Initial residual = 0.004598652, Final residual = 7.893509e-07, No Iterations 2
Min/max T:min(T) [0 0 0 1 0 0 0] 500 max(T) [0 0 0 1 0 0 0] 500
ExecutionTime = 58.22 s  ClockTime = 60 s

Region: windtunnel Courant Number mean: 0.3687364 max: 8187.881
Region: cylinder Diffusion Number mean: 9.508806e-05 max: 0.0002090919
Time = 0.83
so you can see, that there is no change in the temperature in the solid region (because of the mesh?!?) and this is the last step before chtMultiRegionFoam terminates with an error, because the minimum temperature in the fluidRegion becomes negative in the next timestep.

i hope you have now enough information. Thanks for your effort.

greetings Wirman
Attached Images
File Type: png Bild.png (9.9 KB, 13 views)
Wirman is offline   Reply With Quote

Old   November 24, 2014, 07:45
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
I don't know the details of that solver, but the log output sounds like you have the region "windtunnel" where the fluid flows and the region "cylinder" which is solid inside the cylinder. Is that correct?

PS: Wohoooo, this is my 1000th post.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 08:20
Default
  #5
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
yes that is correct.

i tried something that i found in the planeWall2D case, which is an example for the chtMultiRegionFoam solver.

i set the boundaries windtunnel_to_cylinder and cylinder_to_windtunnel to mappedWall instead of wall and then i used for the 0 files:

Code:
boundaryField
{
    cylinder_to_windtunnel
    {
        type           compressible::turbulentTemperatureCoupledBaffleMixed;
	Tnbr           T;
        kappa         solidThermo;
        kappaName none;
        value          uniform 500;
    }
}
and

Code:
boundaryField
{
    windtunnel_to_cylinder
    {
        type           compressible::turbulentTemperatureCoupledBaffleMixed;
	Tnbr           T;
        kappa         fluidThermo;
        kappaName none;
        value          uniform 300;
    }
}
that results in a change of the temperature at the solid, which is good. But the incredible decrease in temperature at the fluid is still there. After 0.03 seconds the temperature minimum is -97K. Showing the case in paraview, i can't spot the minimum and the maximum of temperature, so i don't know what's going wrong ...

here is the log of chtMultiRegionFoam

Code:
Solving for fluid region windtunnel
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.02460263, Final residual = 3.736507e-08, No Iterations 12
DILUPBiCG:  Solving for Uy, Initial residual = 0.03327333, Final residual = 1.240097e-08, No Iterations 14
DILUPBiCG:  Solving for Uz, Initial residual = 0.3112729, Final residual = 8.590666e-08, No Iterations 15
DILUPBiCG:  Solving for h, Initial residual = 0.003709023, Final residual = 9.252748e-08, No Iterations 12
Min/max T:76.66537 499.9691
GAMG:  Solving for p_rgh, Initial residual = 0.6060488, Final residual = 0.004652162, No Iterations 4
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 1.789022e-05, global = 1.050344e-05, cumulative = -0.0001039832
GAMG:  Solving for p_rgh, Initial residual = 0.1844631, Final residual = 4.072585e-08, No Iterations 14
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 2.188366e-10, global = -1.318627e-10, cumulative = -0.0001039833

Solving for solid region cylinder
DICPCG:  Solving for h, Initial residual = 0.3283636, Final residual = 1.500188e-08, No Iterations 4
Min/max T:min(T) [0 0 0 1 0 0 0] 499.6061 max(T) [0 0 0 1 0 0 0] 499.9998
ExecutionTime = 2.91 s  ClockTime = 4 s

Region: windtunnel Courant Number mean: 0.2657095 max: 21.11159
Region: cylinder Diffusion Number mean: 9.508806e-05 max: 0.0002090919
Time = 0.03
PS: Congrats to your 1000th post!
Wirman is offline   Reply With Quote

Old   November 24, 2014, 08:30
Default
  #6
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Ok, again: I never used that solver, but you need a coupled boundary condition for this fluid / solid intersection. This sounds familiar and makes sense. Glad it works now.

The other problem sounds like a numerical failure. Some questions:
1) Is this a transient solver?
2) Can you post more than one time step log output?
3) Can you post fvSchemes and fvSolution?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 08:55
Default
  #7
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
sure i can ;-)

1.) chtMultiRegionFoam is a transient solver, the steady-state version is the chtMultiRegionSimpleFoam.

2. )
Here is the complete log of the solver. Unfortunately it terminates after 3 time steps:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region windtunnel for time = 0

Create solid mesh for region cylinder for time = 0

*** Reading fluid mesh thermophysical properties for region windtunnel

    Adding to thermoFluid

Selecting thermodynamics package 
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

    Adding to rhoFluid

    Adding to UFluid

    Adding to phiFluid

    Adding to gFluid

    Adding turbulence 

Selecting turbulence model type laminar
    Adding to ghFluid

    Adding to ghfFluid

Selecting radiationModel none
    Adding to KFluid

    Adding to dpdtFluid

    Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region cylinder

    Adding to thermos

Selecting thermodynamics package 
{
    type            heSolidThermo;
    mixture         pureMixture;
    transport       constIso;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleEnthalpy;
}

    Adding to radiations

Selecting radiationModel none
    Adding fvOptions

No finite volume options present

Region: windtunnel Courant Number mean: 0.1320233 max: 6.178983
Region: cylinder Diffusion Number mean: 4.754403e-05 max: 0.0001045459
Region: windtunnel Courant Number mean: 0.1320233 max: 6.178983
Region: cylinder Diffusion Number mean: 4.754403e-05 max: 0.0001045459
Time = 0.005


Solving for fluid region windtunnel
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 1.70178e-08, No Iterations 10
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 4.406888e-08, No Iterations 8
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 7.053572e-08, No Iterations 8
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 4.709673e-08, No Iterations 13
Min/max T:300 499.9901
GAMG:  Solving for p_rgh, Initial residual = 0.9248417, Final residual = 0.002323891, No Iterations 2
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 4.026599e-05, global = -2.333879e-05, cumulative = -2.333879e-05
GAMG:  Solving for p_rgh, Initial residual = 0.5507993, Final residual = 5.446465e-08, No Iterations 13
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 8.541335e-11, global = 4.909502e-11, cumulative = -2.333874e-05

Solving for solid region cylinder
DICPCG:  Solving for h, Initial residual = 1, Final residual = 1.22016e-07, No Iterations 3
Min/max T:min(T) [0 0 0 1 0 0 0] 499.8234 max(T) [0 0 0 1 0 0 0] 500
ExecutionTime = 1.78 s  ClockTime = 2 s

Region: windtunnel Courant Number mean: 0.1322938 max: 11.29372
Region: cylinder Diffusion Number mean: 4.754403e-05 max: 0.0001045459
Time = 0.01


Solving for fluid region windtunnel
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.1074785, Final residual = 1.815122e-08, No Iterations 11
DILUPBiCG:  Solving for Uy, Initial residual = 0.022709, Final residual = 8.128951e-08, No Iterations 8
DILUPBiCG:  Solving for Uz, Initial residual = 0.2808652, Final residual = 1.207978e-08, No Iterations 11
DILUPBiCG:  Solving for h, Initial residual = 0.002674789, Final residual = 1.18252e-08, No Iterations 9
Min/max T:86.33847 499.9713
GAMG:  Solving for p_rgh, Initial residual = 0.2937693, Final residual = 0.001758145, No Iterations 4
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 2.432616e-06, global = 7.712725e-07, cumulative = -2.256746e-05
GAMG:  Solving for p_rgh, Initial residual = 0.1388996, Final residual = 6.941843e-08, No Iterations 13
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors (windtunnel): sum local = 8.460298e-11, global = -4.874945e-11, cumulative = -2.256751e-05

Solving for solid region cylinder
DICPCG:  Solving for h, Initial residual = 0.307672, Final residual = 3.77194e-08, No Iterations 3
Min/max T:min(T) [0 0 0 1 0 0 0] 499.6128 max(T) [0 0 0 1 0 0 0] 500.0002
ExecutionTime = 2.76 s  ClockTime = 3 s

Region: windtunnel Courant Number mean: 0.1322697 max: 8.331021
Region: cylinder Diffusion Number mean: 4.754403e-05 max: 0.0001045459
Time = 0.015


Solving for fluid region windtunnel
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCG:  Solving for Ux, Initial residual = 0.02061106, Final residual = 9.475351e-08, No Iterations 12
DILUPBiCG:  Solving for Uy, Initial residual = 0.02154275, Final residual = 5.186294e-08, No Iterations 10
DILUPBiCG:  Solving for Uz, Initial residual = 0.1588295, Final residual = 3.479565e-08, No Iterations 13
DILUPBiCG:  Solving for h, Initial residual = 0.002320682, Final residual = 7.601028e-08, No Iterations 10
Min/max T:-64.83592 499.9816
#0  Foam::error::printStack(Foam::Ostream&) in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#7  Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
#8  
 in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  
 in "/soft/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/chtMultiRegionFoam"
Floating exception
3.) i copied these two from the snappyMultiRegionHeater tutorial

fvSchemes windtunnel
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;

    div(phi,U)      Gauss upwind;
    div(phi,K)      Gauss linear;
    div(phi,h)      Gauss upwind;
    div(phi,k)      Gauss upwind;
    div(phi,epsilon) Gauss upwind;
    div(phi,R)      Gauss upwind;
    div(R)          Gauss linear;
    div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
    default         Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p_rgh;
}

// ************************************************************************* //
fvSolution windtunnel:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    "(rho|rhoFinal)"
    {
        solver          PCG
        preconditioner  DIC;
        tolerance       1e-7;
        relTol          0;
    }

    p_rgh
    {
        solver           GAMG;
        tolerance        1e-7;
        relTol           0.01;

        smoother         GaussSeidel;

        cacheAgglomeration true;
        nCellsInCoarsestLevel 10;
        agglomerator     faceAreaPair;
        mergeLevels      1;
    }

    p_rghFinal
    {
        $p_rgh;
        tolerance        1e-7;
        relTol           0;
    }

    "(U|h|k|epsilon|R)"
    {
        solver           PBiCG;
        preconditioner   DILU;
        tolerance        1e-7;
        relTol           0.1;
    }

    "(U|h|k|epsilon|R)Final"
    {
        $U;
        tolerance        1e-07;
        relTol           0;
    }
}

PIMPLE
{
    momentumPredictor   on;
    nCorrectors         2;
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    fields
    {
    }
    equations
    {
        "h.*"           1;
        "U.*"           1;
    }
}

// ************************************************************************* //
fvSchemes cylinder:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
}

laplacianSchemes
{
    default             none;
    laplacian(alpha,h)  Gauss linear corrected;
}

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
}

// ************************************************************************* //
fvSolution cylinder:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
    h
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0.1;
    }

    hFinal
    {
        $h;
        tolerance        1e-06;
        relTol           0;
    }
}

PIMPLE
{
    nNonOrthogonalCorrectors 0;
}

// ************************************************************************* //
Wirman is offline   Reply With Quote

Old   November 24, 2014, 09:04
Default
  #8
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Ok, tell me if you don't get me. The fluid solver part is something like PIMPLE. Currently you run PIMPLE in PISO mode, because you did not set nOuterCorrectors to anything higher than "1" (actually, you didn't set it at all, thus I see from your log it is set to "1").
Now, your max. Courant number is much too high for the PISO solver. Normally, this leads to numerical instabilities. I recommend to make the time step 20 times smaller, so the max. Co becomes about "0.5". See what happens.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 09:32
Default
  #9
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
i think i can follow you, but i haven't dealt with the theory behind the solvers. Are there any manuals of the theory behind e.g. the chtMultiRegionFoam?

To your suggestion:
There is another fvSolution file in the system ordner and there the nOuterCorrectors is set to 1. 1 or lower is PISO Mode, what are other numbers?

When i make the time steps about 100 times smaller the Courant number looks good (<0.5, beetween something about 0.04 at the beginning and 0.3 at the end where it terminates) but it terminates nevertheless at a t about 0.0004.

Moreover the change in temperature in the solid is very small, but that is maybe because of the short time. But the heavily decrease of the temperature in the fluid is still there...
Wirman is offline   Reply With Quote

Old   November 24, 2014, 09:38
Default
  #10
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Your "min" value in the fluid should not become less than 300, is that what you say?

Try setting laplacian scheme to "uncorrected". Sometimes this can lead to negative wiggles.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 09:54
Default
  #11
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
yep, thats what im saying ... there is a fixed temperature of 300 at the inlet and the cylinder has a temperature of 500, so why should the minimum temperature be under 300? Correct me if i overlook something ...

Setting the laplacian schemes to uncorrected doesn't help
Wirman is offline   Reply With Quote

Old   November 24, 2014, 10:02
Default
  #12
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
What does "checkMesh" show you?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 10:10
Default
  #13
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
checkMesh gives me an FOAM FATAL ERROR:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0



--> FOAM FATAL ERROR: 
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

    From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
    in file db/Time/findInstance.C at line 203.

FOAM exiting
But that makes sense, because i have no polyMesh folder in the constant folder. the polyMesh folder are in the subfolders of windtunnel and cylinder

Code:
-- constant
   -- windtunnel
       -- polyMesh
   -- cylinder
       -- polyMesh
Wirman is offline   Reply With Quote

Old   November 24, 2014, 10:50
Default
  #14
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
I don't know how to use checkMesh for these kind of meshes, sorry.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 10:57
Default
  #15
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
any other ideas? i thought it is actually a primitive case, so it can't be that difficult to make the solver run correctly i really dislike openFoam maybe im too stupid to use it ...
Wirman is offline   Reply With Quote

Old   November 24, 2014, 11:02
Default
  #16
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,297
Rep Power: 26
RodriguezFatz will become famous soon enough
Don't give up that fast...
You need to spot the points where the temperature goes down in paraview. The numerics seem to be ok, so maybe it's some boundary condition error. Whatever, finding it will probably help.
Edit: And you need to get checkMesh running...
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   November 24, 2014, 14:12
Default
  #17
Member
 
Jace
Join Date: Oct 2012
Posts: 77
Rep Power: 15
zhengzh5 is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
I don't know how to use checkMesh for these kind of meshes, sorry.
hey, for these multi-region cases, you have to run "checkMesh -region "region_name".

the other thing worth looking into is how you set your thermophysicalProperties for your fluid/solid regions.
RodriguezFatz likes this.
zhengzh5 is offline   Reply With Quote

Old   November 26, 2014, 12:17
Default
  #18
New Member
 
Join Date: Nov 2014
Posts: 14
Rep Power: 11
Wirman is on a distinguished road
okay, so new try:

first of all i got checkMesh running with the region option (thanks to zhengzh5)

it says that the mesh is ok, but i don't know exactly what it does, so here are the log files:

checkMesh cylinder:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh cylinder for time = 0

Time = 0

Mesh stats
    points:           33596
    faces:            79516
    internal faces:   63660
    cells:            23292
    faces per cell:   6.147003
    boundary patches: 1
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     21416
    prisms:        424
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     1452
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   40
            5   344
            6   372
            9   268
           12   212
           15   132
           18   84

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
    cylinder_to_windtunnel    15856    16354      ok (closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.124999 0 -0.124315) (0.124999 0.01 0.124315)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-2.007952e-18 9.761436e-16 -1.672787e-18) OK.
    Max cell openness = 2.747404e-16 OK.
    Max aspect ratio = 4.733498 OK.
    Minimum face area = 9.65406e-07. Maximum face area = 1.294591e-05.  Face area magnitudes OK.
    Min volume = 8.679143e-10. Max volume = 4.122625e-08.  Total volume = 0.0004866705.  Cell volumes OK.:
    Mesh non-orthogonality Max: 37.56666 average: 7.999011
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.115269 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
and here the checkMesh for the windtunnel:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh windtunnel for time = 0

Time = 0

Mesh stats
    points:           90587
    faces:            223881
    internal faces:   207208
    cells:            66936
    faces per cell:   6.440316
    boundary patches: 7
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     54757
    prisms:        724
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     11455
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            5   376
            6   3004
            9   6523
           12   1000
           15   540
           18   12

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
                   inlet      100      121  ok (non-closed singly connected)
                  outlet      100      121  ok (non-closed singly connected)
               lowerWall      200      231  ok (non-closed singly connected)
               upperWall      200      231  ok (non-closed singly connected)
               frontWall      224      261  ok (non-closed singly connected)
                backWall      224      261  ok (non-closed singly connected)
    windtunnel_to_cylinder    15625    16119      ok (closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.5 -0.25 -0.25) (0.5 0.25 0.25)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (3.994897e-17 3.968973e-17 1.058756e-16) OK.
    Max cell openness = 2.883646e-16 OK.
    Max aspect ratio = 3.224365 OK.
    Minimum face area = 1.049937e-06. Maximum face area = 0.002505055.  Face area magnitudes OK.
    Min volume = 1.671137e-09. Max volume = 0.000125249.  Total volume = 0.2495132.  Cell volumes OK.
    Mesh non-orthogonality Max: 41.73929 average: 11.41158
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.23016 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
and here are the thermophysicalProperties: The properties for air are from the internet, the Properties for the cylinder are properties of a metal, i think steel.

thermophysicalProperties windtunnel (air)
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   28.96;
    }

    transport
    {
		mu 			1.8e-05;
		Pr			0.7;
    }

    thermodynamics
    {
        Hf      2.544e+06;
        Cp      1004.5;
    }
}

// ************************************************************************* //
thermophysicalProperties cylinder (steel)
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            heSolidThermo;
    mixture         pureMixture;
    transport       constIso;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleEnthalpy;
}

mixture
{
    specie
    {
        nMoles      1;
        molWeight   12;
    }

    transport
    {
        kappa   80;
    }

    thermodynamics
    {
        Hf      0;
        Cp      450;
    }

    equationOfState
    {
        rho     8000;
    }
}

// ************************************************************************* //
Wirman is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Overflow Error in Multiphase Modelling with Two Continuous Fluids ashtonJ CFX 6 August 11, 2014 14:32
Boundary Conditions problem o_mars_2010 Main CFD Forum 2 July 8, 2013 02:10
Problem with pressure boundary conditions GunGur OpenFOAM Running, Solving & CFD 0 June 20, 2013 21:31
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Problem with periodic boundary conditions jm_ngs FLUENT 7 April 27, 2012 02:32


All times are GMT -4. The time now is 01:25.