CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   chtMultiRegionFoam wrong value of kappa using constAnIsoSolid (https://www.cfd-online.com/Forums/openfoam-solving/245936-chtmultiregionfoam-wrong-value-kappa-using-constanisosolid.html)

Bazyl29 November 3, 2022 08:48

chtMultiRegionFoam wrong value of kappa using constAnIsoSolid
 
Hello everyone!

Currently, I'm working on simulations of battery cooling using chtMultiRegionFoam with OpenFOAM 10. I performed my first simulation and compared the results to the ANSYS Fluent, which unfortunately had significant differences in cells' temperatures between each other. As one of the steps of searching for the reason for discrepancies, I have prepared a simple simulation consisting only of one solid region with simple boundary conditions that I can calculate analytically. The key here is that I want to use anisotropic thermal conductivity in a cylindrical coordinate system to model conduction in cells, so I created a model as in the picture below:

https://i.ibb.co/jwzV3sn/model-scheme.png


Using this model I have found that I get a strange behaviour of thermal conductivity in OpenFOAM when using constAnIsoSolid with a cylindrical coordinate system. I have performed 5 simulations:
  1. OpenFOAM with isotropic thermal conductivity set to 1.3 W/mK
  2. OpenFOAM with anisotropic thermal conductivity in a cylindrical coordinate system set to (1.3 28 28) #by my understanding it is (r, theta, z)
  3. OpenFOAM with anisotropic thermal conductivity in a cylindrical coordinate system set to (1.3 1.3 1.3)
  4. Fluent with isotropic thermal conductivity set to 1.3
  5. Fluent with anisotropic thermal conductivity in a cylindrical coordinate system set to (1.3 28 28)

The results are compared below:

https://i.ibb.co/CH4123Y/comparison2.png

https://i.ibb.co/WvQsBrx/comparison.png

https://i.ibb.co/L9vgtw0/table.png

As you can see, using ANSYS Fluent the results are very close to analytical. Also, the results for isotropic 1.3 and anisotropic (1.3 28 28) are the same, which in my reasoning makes sense as the top, bottom and side walls are insulated and the only heat transfer direction is radial thus other conductivity vector components do not matter. The results for OpenFOAM with isotropic conductivity 1.3 and anisotropic conductivity (1.3 1.3 1.3) were the same and also close to analytical and Fluent. The problem starts when I use anisotropic thermal conductivity (1.3 28 28) - the maximum temperature is around 4 K lower compared to analytical and Fluent, as well as there is a discrepancy between (1.3 28 28) and (1.3 1.3 1.3) - based on the analytical calculation the kappa in radial direction would need to be 2.38 W/mK to match the temperature achieved at the inner radius wall.

I have attached fragments of code with T boundary conditions and conductivity definition in the cylindrical coordinate system as I presume the potential error is somewhere there. There is also no tutorial in $FOAM_TUTORIALS that covers anisotropic conductivity. Based on the results and looking into examples definition of a cylindrical coordinate system seems OK, but maybe I have missed something. I have tried to define additional properties of "externalWallHeatFluxTemperature" boundary conditions (as well as "compressible::turbulentTemperatureCoupledBaffleMi xed", which I have used initially in the more complicated simulation) based on the various threads I have found online (kappaMethod directionalSolidThermo, alphaAni Anialpha, etc.) but none of it seemed to work.

Code:

dimensions      [ 0 0 0 1 0 0 0 ];

internalField  uniform 300;

boundaryField
{
    #includeEtc "caseDicts/setConstraintTypes"

    "sides"
    {
        type            zeroGradient;
    }   
    "inner"
    {
        type            externalWallHeatFluxTemperature;
        q              uniform 1000;
        value          uniform 300;
    }
    "outer"
    {
        type            fixedValue;
        value          uniform 300;
    }
}

Code:

thermoType
{
    type            heSolidThermo;
    mixture        pureMixture;
    transport      constAnIsoSolid;
    thermo          eConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        molWeight      18;
    }
    equationOfState
    {
        rho            2650;
    }
    thermodynamics
    {
        Hf              0;
        Cv              1263;
    }
    transport
    {
        kappa          ( 1.3 28 28 );
    }
}

coordinateSystem
{
    type            cartesian;
    origin          ( 0 0 0 );
    coordinateRotation
    {
        type            cylindrical;
        e3              ( 0 0 1 );
    }
}

Did anyone encounter a similar issue and knows how to fix it? I would really appreciate your help as I'm not an experienced OpenFOAM user and have tried everything that I could find without any success and have run out of potential resolutions. If someone would like to dive deeper into the code, I can upload other fragments or send the whole directory (unfortunately file size limit didn't let me attach it).


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