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

chtMultiRegionSimpleFoam: Confusion in geometry creation using blockMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By Bloerb
  • 2 Post By derekm
  • 2 Post By Bloerb

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 15, 2016, 08:05
Default chtMultiRegionSimpleFoam: Confusion in geometry creation using blockMesh
  #1
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Hello Foamers,

First of all I apologize for being a newbie (noob). But I am trying to learn openfoam by my own. And it gets really difficult when I encounter such problems.

From some time I have been trying to simulate a problem involving heat transfer between fluid and solids, using chtMultiRegionSimpleFoam for the case of a ladle which is used in continuous casting of steel.

I created the slightly complicated mesh using blockMesh. The mesh has three different regions i.e. two solid and one liquid.

My first doubt is that I created all the boundaries of these regions separately which means that for a common boundary there are two different face/wall which lies in the respective region. Is this fine?
for example if you see the attached figures: for domain0 I defined the curvedWalls and for domain1 I defined the same wall (using different vertices number) as sideLayerInnerWalls.

The second dumb doubt arose when I run blockMesh followed by splitMeshRegions -cellZones -overwrite as that did not create any domain*_to_domain* like mappedWalls in constant/domain*/polyMesh/boundary files as given in the tutorial. And that is also obvious that why a third boundary would be created for the common boundary whom I already assigned two different names!!

But at this I did not stop I was so desperate to run this that I modified the files in constant/* so that they match with the case given in tutorial.

I noticed that in the tutorial there were no common boundaries mentioned in constant/polyMesh/boundary file so I did the same with my case file.

and also in the tutorial the common boundaries in constant/domain*/polyMesh/boundary files were of type domain*_to_domain*, so I manually changed the boundaries named curvedWalls, sideLayerInnerWalls to domain0_to_domain1, domain1_to_domain0 and so on. I tried to keep the format same as well like:
Code:
  domain0_to_domain1
    {
        type            mappedWall;
        inGroups        1(wall);
        nFaces          4000;
        startFace       299600;
        sampleMode      nearestPatchFace;
        sampleRegion    domain1;
        samplePatch     domain1_to_domain0;
    offsetMode uniform;
    offset (0 0 0);
    }
But after setting the whole case with similar conditions in 0 and system folder I get this error:

Code:
[1016914@hpc4 Ladle_Tapered_Edited]$ chtMultiRegionSimpleFoam 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : chtMultiRegionSimpleFoam
Date   : Jul 15 2016
Time   : 12:41:35
Host   : "hpc4"
PID    : 41191
Case   : /home/1016914/Ladle_Tapered_Edited
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region domain0 for time = 0

Create solid mesh for region domain1 for time = 0

Create solid mesh for region domain2 for time = 0

*** Reading fluid mesh thermophysical properties for region domain0

    Adding to thermoFluid

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

    Adding to rhoFluid

    Adding to UFluid

    Adding to phiFluid

    Adding to gFluid

    Adding to turbulence

Selecting turbulence model type laminar
    Adding to ghFluid

    Adding to ghfFluid

Selecting radiationModel none
    Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region domain1

    Adding to thermos

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



--> FOAM FATAL ERROR: 

    patch type 'genericPatch' not type 'mappedPatchBase'
    for patch domain1_to_domain0 of field T in file "/home/1016914/Ladle_Tapered_Edited/0/domain1/T"

    From function turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)

    in file derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C at line 105.

FOAM exiting
Attaching the link for the whole case:
https://www.dropbox.com/sh/kl2ubckw9...1X5WZ24ba?dl=0

NOTE: domain0 is fluid, domain1 & domain2 are solid.

I would be very obliged if I may get some help for this case.

Thanks and regards,
Singh.
Attached Images
File Type: jpg wholegeom.jpg (87.2 KB, 37 views)
File Type: jpg domain0.jpg (46.3 KB, 38 views)
File Type: jpg domain1.jpg (57.1 KB, 32 views)
File Type: jpg domain2.jpg (25.2 KB, 32 views)
Struggle_Achieve is offline   Reply With Quote

Old   July 20, 2016, 17:38
Default
  #2
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
Just downloaded your case. You might laugh

Change mappedwall to mappedWall and you are good to go
Sadly couldn't test it all since i need to do some changes to make it work in openfoam 4.0 and I am to lazy for that, but it fixes your bug.
Struggle_Achieve likes this.
Bloerb is offline   Reply With Quote

Old   July 22, 2016, 02:35
Default Thanks a lot
  #3
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
Just downloaded your case. You might laugh

Change mappedwall to mappedWall and you are good to go
Sadly couldn't test it all since i need to do some changes to make it work in openfoam 4.0 and I am to lazy for that, but it fixes your bug.
Hey Bloerb,

First of all thanks for sorting out my confusion!! And yes I was laughing and at the same time was ashamed of my dumbness

The simulation finally started but as I saw the results my smile diminished with each time step.
Code:
[1016914@hpc4 Ladle_Tapered_Edited]$ chtMultiRegionSimpleFoam 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : chtMultiRegionSimpleFoam
Date   : Jul 22 2016
Time   : 11:31:31
Host   : "hpc4"
PID    : 58844
Case   : /home/1016914/Ladle_Tapered_Edited
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region domain0 for time = 0

Create solid mesh for region domain1 for time = 0

Create solid mesh for region domain2 for time = 0

*** Reading fluid mesh thermophysical properties for region domain0

    Adding to thermoFluid

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

    Adding to rhoFluid

    Adding to UFluid

    Adding to phiFluid

    Adding to gFluid

    Adding to turbulence

Selecting turbulence model type laminar
    Adding to ghFluid

    Adding to ghfFluid

Selecting radiationModel none
    Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region domain1

    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 opaqueSolid
Selecting absorptionEmissionModel constantAbsorptionEmission
Selecting scatterModel none
Selecting sootModel none
    Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region domain2

    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 opaqueSolid
Selecting absorptionEmissionModel constantAbsorptionEmission
Selecting scatterModel none
Selecting sootModel none
    Adding fvOptions

No finite volume options present

Time = 1


Solving for fluid region domain0
DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.001983051, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 1, Final residual = 0.001979981, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 0.002421091, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 1, Final residual = 0.01245681, No Iterations 2
Min/max T:1819.717 1967.335
GAMG:  Solving for p_rgh, Initial residual = 0.8669202, Final residual = 0.007969747, No Iterations 14
time step continuity errors : sum local = 160048.2, global = -3.154463e-10, cumulative = -3.154463e-10
Min/max rho:7100 7100

Solving for solid region domain1
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.01852429, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 1473 max(T) [0 0 0 1 0 0 0] 1851.587

Solving for solid region domain2
DICPCG:  Solving for h, Initial residual = 1, Final residual = 0.03243454, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 1473 max(T) [0 0 0 1 0 0 0] 1837.778
ExecutionTime = 4.05 s  ClockTime = 5 s

Time = 2


Solving for fluid region domain0
DILUPBiCG:  Solving for Ux, Initial residual = 0.02045795, Final residual = 0.0003467354, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.02066958, Final residual = 0.0004041416, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.01316861, Final residual = 0.0005562322, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.8015651, Final residual = 0.06417413, No Iterations 1
Min/max T:1573.937 2150.671
GAMG:  Solving for p_rgh, Initial residual = 0.9999985, Final residual = 0.005263133, No Iterations 9
time step continuity errors : sum local = 27065.19, global = -2.162233e-12, cumulative = -3.176086e-10
Min/max rho:7100 7100

Solving for solid region domain1
DICPCG:  Solving for h, Initial residual = 0.1885682, Final residual = 0.005275454, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 1473 max(T) [0 0 0 1 0 0 0] 2098.361

Solving for solid region domain2
DICPCG:  Solving for h, Initial residual = 0.2663438, Final residual = 0.01074061, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] 1473 max(T) [0 0 0 1 0 0 0] 2108.484
ExecutionTime = 6.02 s  ClockTime = 7 s

Time = 3


Solving for fluid region domain0
DILUPBiCG:  Solving for Ux, Initial residual = 0.06951212, Final residual = 0.0009686997, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.07005045, Final residual = 0.000990264, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.1384241, Final residual = 0.001438284, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.9103335, Final residual = 0.01630864, No Iterations 2
Min/max T:-45027.6 14404.21
GAMG:  Solving for p_rgh, Initial residual = 0.8189507, Final residual = 0.007954337, No Iterations 4
time step continuity errors : sum local = 55302.05, global = 8.83666e-12, cumulative = -3.087719e-10
Min/max rho:7100 7100

Solving for solid region domain1
DICPCG:  Solving for h, Initial residual = 0.1037549, Final residual = 0.003492681, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] -34908.1 max(T) [0 0 0 1 0 0 0] 2700.779

Solving for solid region domain2
DICPCG:  Solving for h, Initial residual = 0.1834975, Final residual = 0.0067439, No Iterations 1
Min/max T:min(T) [0 0 0 1 0 0 0] -34476.12 max(T) [0 0 0 1 0 0 0] 2691.483
ExecutionTime = 7.73 s  ClockTime = 9 s

Time = 4


Solving for fluid region domain0
DILUPBiCG:  Solving for Ux, Initial residual = 0.14883, Final residual = 0.001696243, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.1488402, Final residual = 0.001676184, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.225239, Final residual = 0.002245755, No Iterations 1
DILUPBiCG:  Solving for h, Initial residual = 0.2858903, Final residual = 0.01353399, No Iterations 2


--> FOAM FATAL ERROR: 
Maximum number of iterations exceeded

    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
    in file /opt/OpenFOAM/OpenFOAM-2.3.1/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy>::*)(double) const) const in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#3  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::calculate() in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#4  Foam::heRhoThermo<Foam::rhoThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::rhoConst<Foam::specie> >, Foam::sensibleEnthalpy> > > >::correct() in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#5  
 in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/bin/chtMultiRegionSimpleFoam"
#6  __libc_start_main in "/lib64/libc.so.6"
#7  
 in "/opt/OpenFOAM/OpenFOAM-2.3.1/platforms/linux64GccDPOpt/bin/chtMultiRegionSimpleFoam"
Aborted
I set the temperature for molten steel (domain 0) to 1873 C (sorry for omitting degree symbol) and for the ladle walls (domain 1 and 2) it was 1473 C.
And for time =1, you can see that the maximum temperature in the domain0 reaches to 1967 C ( how this is possible?? there is no heat source how the temperature rises on its own?)
And afterwards the minimum temperature is reaching to the depths of the world with negative values (-45027 C).

I took the planewall2D case:
https://openfoamwiki.net/index.php/G..._-_planeWall2D
As a reference and I tried to set my case similar to this.

I guess something might be wrong with the boundary conditions.

Also that in constant/domain0/thermophysicalProperties I have ignored molWeight for steel as there is no such thing as molecular weight for steel.
I am also confused about the role of this SPECIES mentioned in this file.
Is this the reason of the error?

I also checked my mesh using checkMesh and there were some warnings which arose as I manually changed the constant/polyMesh/boundary file so that it does not have any common boundaries to make it like the one in the planewall2D example.
Code:
[1016914@hpc4 Ladle_Tapered_Edited]$ checkMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : checkMesh
Date   : Jul 22 2016
Time   : 12:34:58
Host   : "hpc4"
PID    : 2160
Case   : /home/1016914/checkLADLECHT/Ladle_Tapered_Edited
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           225051
    faces:            648800
    internal faces:   623200
    cells:            212000
    faces per cell:   6
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     212000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
 ****Problem with boundary patch 0 named upperWall of type wall. The patch should start on face no 623200 and the patch specifies 624800.
Possibly consecutive patches have this same problem. Suppressing future warnings.
 ***Boundary definition is in error.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 3
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 100000 cells to cellSet region0
  <<Writing region 1 with 80000 cells to cellSet region1
  <<Writing region 2 with 32000 cells to cellSet region2

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    upperWall           2000     2041     ok (non-closed singly connected)  
    sideLayerTopWall    1600     1680     ok (non-closed singly connected)  
    sideLayerOuterWalls 4000     4080     ok (non-closed singly connected)  
    botLayerBotWall     1600     1680     ok (non-closed singly connected)  
    botLayerOutletWalls 1600     1680     ok (non-closed singly connected)  
    outlet              400      441      ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-1.682354 -1.682354 -3.48407) (1.682354 1.682354 0)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (3.426689e-18 -2.167352e-17 -2.683966e-16) OK.
    Max cell openness = 3.897888e-16 OK.
    Max aspect ratio = 8.056181 OK.
    Minimum face area = 4.414269e-05. Maximum face area = 0.00920317.  Face area magnitudes OK.
    Min volume = 3.141301e-06. Max volume = 0.0003463098.  Total volume = 29.06186.  Cell volumes OK.
    Mesh non-orthogonality Max: 44.25843 average: 16.86986
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.303569 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
I would be very grateful if you kindly help me on this matter.

Regards,
Singh.

Last edited by Struggle_Achieve; July 22, 2016 at 03:12. Reason: adding info
Struggle_Achieve is offline   Reply With Quote

Old   July 22, 2016, 03:37
Default
  #4
Senior Member
 
Derek Mitchell
Join Date: Mar 2014
Location: UK, Reading
Posts: 172
Rep Power: 13
derekm is on a distinguished road
A tip for learning for self learning openfoam
Start with a tutorial that you know works and change it one bit at a time so that you slowly approach the problem you want to solve. Save every step as a new case so if you run in trouble you can regress back to the state of working.

Later
If you then want to add a completely new feature to your now complex large model . First add it to a working tutorial or simpler stage you have previously created.

This might seem obvious but is sometimes forgotten
__________________
A CHEERING BAND OF FRIENDLY ELVES CARRY THE CONQUERING ADVENTURER OFF INTO THE SUNSET
derekm is offline   Reply With Quote

Old   July 22, 2016, 03:53
Default
  #5
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Quote:
Originally Posted by derekm View Post
A tip for learning for self learning openfoam
Start with a tutorial that you know works and change it one bit at a time so that you slowly approach the problem you want to solve. Save every step as a new case so if you run in trouble you can regress back to the state of working.

Later
If you then want to add a completely new feature to your now complex large model . First add it to a working tutorial or simpler stage you have previously created.

This might seem obvious but is sometimes forgotten
Hey Derek,

Thanks for the tip, I will surely follow these steps.

Regards,
Singh.
Struggle_Achieve is offline   Reply With Quote

Old   July 24, 2016, 14:26
Default
  #6
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
Quote:
Also that in constant/domain0/thermophysicalProperties I have ignored molWeight for steel as there is no such thing as molecular weight for steel.
I am also confused about the role of this SPECIES mentioned in this file.
Is this the reason of the error?
The molWeight is irrelevant for your calculations. Your specie is defined as a pure mixture. Hence none of that goes into your calculation. The solver complains if there is no number, but what number you choose does not affect your result.

Now to your problem. Given your densities you have a fluid region filled with fluid steel surrounded by solid aluminum walls. Correct?

Now lets take a look at your boundaries. You have fixed the velocity to zero on every boundary of your fluid domain. Hence no liquid can enter or exit. Since you defined it as a fluid region you want to model the velocities as well. The only thing that can create velocities is now the density change, yet you define your fluid as one having a constant density. Why do you want to solve the momentum balance? You could simply add "frozenFlow on;" in your fvSolution file to save some time and add stability.

Now assuming this is what you want to solve we only need to look at the temperature boundaries. You define a fixedGradient. This is possible but I'd encourage you to use externalWallHeatFluxTemperature or turbulentHeatFluxTemperature as the boundary condition. The first one is a robin type boundary for a given heat transfer coefficient and the second one lets you specify a heat flux or power.

You might need to modify this slightly for your openfoam version (take a look at the boundary in the source code. There is usually a description ):
Code:
        hotWall
        {
            type            compressible::turbulentHeatFluxTemperature;
            heatSource      flux;        // power [W]; flux [W/m2]
            q               uniform 10;  // heat power or flux
            kappa           fluidThermo; // calculate kappa=alphaEff*thermo.Cp
            Qr              none;        // name of the radiative flux
            value           uniform 300; // initial temperature value
        }
All of your fluid walls are either coupled or have a positive heat flux into the domain. All of your solid domains are perfectly insulated. Hence you are adding heat to the system but have no sink. What happens is what you'd expect. There is no steady state solution and your solver crashes.
Struggle_Achieve and vs1 like this.
Bloerb is offline   Reply With Quote

Old   July 26, 2016, 04:43
Thumbs up Gratitude!
  #7
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
The molWeight is irrelevant for your calculations. Your specie is defined as a pure mixture. Hence none of that goes into your calculation. The solver complains if there is no number, but what number you choose does not affect your result.

Now to your problem. Given your densities you have a fluid region filled with fluid steel surrounded by solid aluminum walls. Correct?

Now lets take a look at your boundaries. You have fixed the velocity to zero on every boundary of your fluid domain. Hence no liquid can enter or exit. Since you defined it as a fluid region you want to model the velocities as well. The only thing that can create velocities is now the density change, yet you define your fluid as one having a constant density. Why do you want to solve the momentum balance? You could simply add "frozenFlow on;" in your fvSolution file to save some time and add stability.

Now assuming this is what you want to solve we only need to look at the temperature boundaries. You define a fixedGradient. This is possible but I'd encourage you to use externalWallHeatFluxTemperature or turbulentHeatFluxTemperature as the boundary condition. The first one is a robin type boundary for a given heat transfer coefficient and the second one lets you specify a heat flux or power.

You might need to modify this slightly for your openfoam version (take a look at the boundary in the source code. There is usually a description ):
Code:
        hotWall
        {
            type            compressible::turbulentHeatFluxTemperature;
            heatSource      flux;        // power [W]; flux [W/m2]
            q               uniform 10;  // heat power or flux
            kappa           fluidThermo; // calculate kappa=alphaEff*thermo.Cp
            Qr              none;        // name of the radiative flux
            value           uniform 300; // initial temperature value
        }
All of your fluid walls are either coupled or have a positive heat flux into the domain. All of your solid domains are perfectly insulated. Hence you are adding heat to the system but have no sink. What happens is what you'd expect. There is no steady state solution and your solver crashes.
Hello Bloerb!
Yes you are indeed right about molten steel and aluminum!

And thanks for explaining this quite perfectly. I changed the BC's to externalWallHeatFluxTemperature and tried to run the simulation but again the temperature was diverging with negative and positive extremes.

But when I added frozenFlow on; in fvSolution to off the momentum eqns then the simulation is running and probably showing right results also.
But when I am post processing in paraview it is showing some error in face number.

Now one thing is clear that the temperature is diverging because of the flow conditions or due to the changes I made in the mesh ( manually added domain0_to_domain1, etc)
I will try to open the outlet and let the molten steel exit from bottom to see if this improves anything.
I will try to mesh using snappyHexMesh.
I am also planning to add boussinesq approximation to this solver to include the flow due to density variation.

My deepest gratitude for clearing my doubts and thus enabling me to reach this far.

Thanks and regards,
Singh.
Struggle_Achieve is offline   Reply With Quote

Old   July 26, 2016, 05:03
Default
  #8
Senior Member
 
Join Date: Sep 2013
Posts: 353
Rep Power: 20
Bloerb will become famous soon enough
You can simply change the density calculation from rhoConst tho perfectFluid in your thermoDynamicalProperties. Check the tutorials on how to set the changes that come with it. That should allow you to simulate what you want without modifying the solver.

BUT this is not a steady state problem. chtMultiRegionSimpleFoam will solve for the state after an infinite amount of time. Since you add energy by a constant heat flux into the domain, but have no sink in form of a specified wall temperature or any kind of flow out of the domain the steady state solution is INFINITE Temperature. Use chtMultiRegionFoam instead. This will take substantially longer to simulate though.

Your paraview problem can be fixed by deleting or renaming the constant/polyMesh folder. Right now paraview loads your 3 domains and 1 domain containing everything (the constant/polyMesh directory).

I would not use snappy hex mesh. Your mesh right now is already of good quality.

Opening the outlet won't do anything. You'd also need to open your inlet. With only an outlet nothing will flow out, because nothing can enter.
Bloerb is offline   Reply With Quote

Old   July 26, 2016, 06:39
Lightbulb
  #9
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Quote:
Originally Posted by Bloerb View Post
You can simply change the density calculation from rhoConst tho perfectFluid in your thermoDynamicalProperties. Check the tutorials on how to set the changes that come with it. That should allow you to simulate what you want without modifying the solver.

BUT this is not a steady state problem. chtMultiRegionSimpleFoam will solve for the state after an infinite amount of time. Since you add energy by a constant heat flux into the domain, but have no sink in form of a specified wall temperature or any kind of flow out of the domain the steady state solution is INFINITE Temperature. Use chtMultiRegionFoam instead. This will take substantially longer to simulate though.

Your paraview problem can be fixed by deleting or renaming the constant/polyMesh folder. Right now paraview loads your 3 domains and 1 domain containing everything (the constant/polyMesh directory).

I would not use snappy hex mesh. Your mesh right now is already of good quality.

Opening the outlet won't do anything. You'd also need to open your inlet. With only an outlet nothing will flow out, because nothing can enter.
Thanks for the suggestions, yes its a very good idea to change the density to perfect fluid and to incorporate boussinesq approximation there itself rather than modifying the solver. I will try to work on this.
And actually I am sorry that initially I forgot to put a negative sign for the gradient value. So basically I have the upperwall, side walls of outerlayer and bottomost wall as heat sink and I have used externalHeatFluxTemperature BC for them.

Its good to know that my mesh is fine and there are only some naming issues.
I will try to fix these issues and will post the results soon.

Yes you are right that just opening the outlet wont start any flow without having any opening in the top. I will try to modify my mesh accordingly.

Thanks for the valuable suggestions.
Struggle_Achieve is offline   Reply With Quote

Reply


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
[ICEM] Complex geometry creation nirmal_singh ANSYS Meshing & Geometry 0 January 3, 2016 20:13
[DesignModeler] geometry creation kmgraju ANSYS Meshing & Geometry 0 November 18, 2012 22:30
Best free tool for Geometry creation mmkr825 OpenFOAM 12 October 8, 2012 02:53
[snappyHexMesh] Internal geometry invisible and merely reflects on blockMesh sgl OpenFOAM Meshing & Mesh Conversion 15 July 5, 2012 20:25
star ccm+ new geometry part creation krishna086 STAR-CCM+ 0 November 24, 2010 11:17


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