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/)
-   -   Effective thermal conductivity chtMultiRegionSimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/239450-effective-thermal-conductivity-chtmultiregionsimplefoam.html)

derekm November 6, 2021 04:09

Effective thermal conductivity chtMultiRegionSimpleFoam
 
2 Attachment(s)
In the standard solid energy equation betav scales the thermal diffusivity
and if betav is great than one the energy moving through the medium increases


To model a porosity in fluid I use fvOptions explicitPorositySource to cater for the momentum. I modified the fluid energy equation to make it similar to the usage of betav i.e betaw in the lapacian term. This is to enable varying the effective conductivity of the fluid. But if betaw is greater than 1 the energy flow through the medium decreases. Why is this the opposite effect to the solid ?????
modified solver and case file attached OpenFOAM version 4.x


Modified file: UchtMultiRegionSimpleFoam/fluid/EEqn.H betaw multipler is the only modification

Code:

{
    volScalarField& he = thermo.he();

    fvScalarMatrix EEqn
    (
        fvm::div(phi, he)
      + (
            he.name() == "e"
          ? fvc::div(phi, volScalarField("Ekp", 0.5*magSqr(U) + p/rho))
          : fvc::div(phi, volScalarField("K", 0.5*magSqr(U)))
        )
      - fvm::laplacian(betaw*turb.alphaEff(), he)
    ==
        rho*(U&g)
      + rad.Sh(thermo)
      + fvOptions(rho, he)
    );

    EEqn.relax();

    fvOptions.constrain(EEqn);

    EEqn.solve();

    fvOptions.correct(he);

    thermo.correct();
    rad.correct();

    Info<< "Min/max T:" << min(thermo.T()).value() << ' '
        << max(thermo.T()).value() << endl;
}

unchanged Solid file:UchtMultiRegionFoam/UchtMultiRegionSimpleFoam/solid/solveSolid.H


Code:

{
    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
    {
        fvScalarMatrix hEqn
        (
            (
                thermo.isotropic()
              ? -fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
              : -fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
            )
          ==
            fvOptions(rho, h)
        );

        hEqn.relax();

        fvOptions.constrain(hEqn);

        hEqn.solve();

        fvOptions.correct(h);
    }
}

thermo.correct();

Info<< "Min/max T:" << min(thermo.T()).value() << ' '
    << max(thermo.T()).value() << endl;

added code in file: UchtMultiRegionFoam/UchtMultiRegionSimpleFoam/fluid/createFluidFields.H



Code:

PtrList<volScalarField> betawFluid(fluidRegions.size());





  // betawFluid mod start
    Info<< "    Adding to betawFluid\n" << endl;
      IOobject betawFluidIO
        (
            "betawFluid",
            runTime.timeName(),
            fluidRegions[i],
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        );

        if (betawFluidIO.headerOk())
        {
            Info<< "    reading betawFluid file \n" << endl;
            betawFluid.set
            (
                i,
                new volScalarField(betawFluidIO, fluidRegions[i])
            );
        }
        else
        {
            Info<< "    reading all betawFluid as 1.0 \n" << endl;
            betawFluid.set
            (
                i,
                new volScalarField
                (
                    IOobject
                    (
                        "betawFluid",
                        runTime.timeName(),
                        fluidRegions[i],
                        IOobject::NO_READ,
                        IOobject::NO_WRITE
                    ),
                    fluidRegions[i],
                    dimensionedScalar("1", dimless, scalar(1.0))
                )
            );
        }
        //betawFluid mod end

added line in UchtMultiRegionSimpleFoam/fluid/setRegionFluidFields.H



Code:

const volScalarField& betaw = betawFluid[i];


All times are GMT -4. The time now is 21:49.