CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   How to define Vacuum Conditions in OpenFoam (https://www.cfd-online.com/Forums/openfoam-pre-processing/219739-how-define-vacuum-conditions-openfoam.html)

Raza Javed August 7, 2019 07:05

How to define Vacuum Conditions in OpenFoam
 
Hello Everyone,


I am using chtMultiRegionSimpleFoam and my Openfoam version is 4.1


I am trying to simulate radiation heat transfer in a vacuum.


My questions are the following:


1. How can we generate a vacuum? For example If I have one rectangular region and I want to make it a vacuum, Do I need to change themophysical properties?


2. which radiation model would be suitable for vacuum?


I shall be very thankful for your help.


Thank you

simrego August 12, 2019 05:43

Hi!


1. Just set the reference pressure to your needs in the fvSolution file. I assume that you have a closed volume.
Change from what?



2. It depends. The medium is participating in the radiation, or not? It is optically thick, or not?

Raza Javed August 12, 2019 05:52

1 Attachment(s)
Quote:

Originally Posted by simrego (Post 741814)
Hi!


1. Just set the reference pressure to your needs in the fvSolution file. I assume that you have a closed volume.
Change from what?



2. It depends. The medium is participating in the radiation, or not? It is optically thick, or not?




Thank you so much for your reply.


My geometry is attached. Please have a look


The green region is a heater, and the blue region is the air, that I want to make vacuum. because I want to see the behavior of radiations in the vacuum coming out from the green heater.


Please let me know if you need further clarification about the case.


thank you

Raza Javed August 12, 2019 05:53

Quote:

Originally Posted by simrego (Post 741814)
Hi!


1. Just set the reference pressure to your needs in the fvSolution file. I assume that you have a closed volume.
Change from what?



2. It depends. The medium is participating in the radiation, or not? It is optically thick, or not?




I am putting viewFactor radiation model in the region air, and radiation model Opaque on the heater.

simrego August 12, 2019 07:24

Since this is air, the viewFactor model seems fine.
For the vacuum what is the pressure in the vacuum? And again this is a closed volume, right? without inlets/outlets.

Raza Javed August 12, 2019 07:37

Quote:

Originally Posted by simrego (Post 741834)
Since this is air, the viewFactor model seems fine.
For the vacuum what is the pressure in the vacuum? And again this is a closed volume, right? without inlets/outlets.


Yes this is a closed volume without inlets/outlets. Below is the mesh information for my air region:


Code:

2
(
    defaultFaces
    {
        type            wall;
        nFaces          8400;
        startFace      319164;
    }

    vacuum_to_heater
    {
        type            mappedWall;
        inGroups        1 ( wall );
        nFaces          336;
        startFace      327564;
        sampleMode      nearestPatchFace;
        sampleRegion    heater;
        samplePatch    heater_to_vacuum;
    }

)

Vacuum is the name of my Air region.

The pressure I am using is 1 bar, you can see below the changeDictionaryDict of my air(vacuum name used in the case) region:
I have put the zero velocity, so that there should be no heat transfer through convection.



Code:

boundary
{
    defaultFaces
    {
        type            wall;
    }
}

T
{
    internalField  uniform 300;

    boundaryField
    {
        defaultFaces
        {
            type            zeroGradient;
        }

        "vacuum_to_.*"
        {

            type            compressible::turbulentTemperatureCoupledBaffleMixed;
            Tnbr            T;
            kappaMethod    fluidThermo;
            value          uniform 300;
        }
    }
}

U
{
    internalField  uniform (0 0 0);

    boundaryField
    {

        defaultFaces
        {
            type            noSlip;
        }
        "vacuum_to_.*"
        {
            type            noSlip;
        }

    }
}

p_rgh
{
    internalField  uniform 0;

    boundaryField
    {

        defaultFaces
        {
            type            fixedFluxPressure;
            value          uniform 0;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value          uniform 0;
        }
    }
}

p
{
    internalField  uniform 100000;

    boundaryField
    {
        ".*"
        {
            type            fixedValue;
            value          uniform 100000;
        }
    }
}


simrego August 12, 2019 08:50

In this solver the calculated pressure field is p_rgh. p is calculated from p_rgh. You should just set calculated BC for every p field. Also these values are only the initial values. In your air/fvSolution file you have to define a reference cell, and a referecne pressure. You can set it to 1bar if your pressure is 1 bar in the domain.
For the material properties you can use what you want, but you need a temperature dependent density. You will have some convective heat transfer. In the U file all you do is set the velocity on the boundaries to zero, which is correct for a wall. But in the domain you will have non zero velocities. (nonuniform temperature field -> nonuniform density -> fluid will start moving.)

Raza Javed August 12, 2019 09:03

Quote:

Originally Posted by simrego (Post 741850)
In this solver the calculated pressure field is p_rgh. p is calculated from p_rgh. You should just set calculated BC for every p field. Also these values are only the initial values. In your air/fvSolution file you have to define a reference cell, and a referecne pressure. You can set it to 1bar if your pressure is 1 bar in the domain.
For the material properties you can use what you want, but you need a temperature dependent density. You will have some convective heat transfer. In the U file all you do is set the velocity on the boundaries to zero, which is correct for a wall. But in the domain you will have non zero velocities. (nonuniform temperature field -> nonuniform density -> fluid will start moving.)


So, the boundary conditions and initial values for p_rgh would remain as they are? like below:
Code:

p_rgh
{
    internalField  uniform 0;

    boundaryField
    {

        defaultFaces
        {
            type            fixedFluxPressure;
            value          uniform 0;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value          uniform 0;
        }
    }
}


And for pressure I should put on each boundary "calculated"?



Material properties of my air region is below:


Code:

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

mixture
{
    specie
    {
        nMoles          1;
        molWeight      28.9;
    }
    thermodynamics
    {
        Cp              1000;
        Hf              0;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}


But there is no entry for density (rho). shall I put one?


I exactly dont know How to define the reference cell and reference pressure? Below is my air/fvSolution file


Code:

solvers
{
    rho
    {
        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;

        maxIter          10;
    }

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

SIMPLE
{
    momentumPredictor on;
    nNonOrthogonalCorrectors 2;
    pRefCell        0;
    pRefValue      100000;
    rhoMin          rhoMin [1 -3 0 0 0] 700;
    rhoMax          rhoMax [1 -3 0 0 0] 1200;
}

relaxationFactors
{
    fields
    {
        rho            1;
        p_rgh          0.7;
    }
    equations
    {
        U              0.7;
        h              0.7;
        nuTilda        0.7;
        k              0.7;
        epsilon        0.7;
        omega          0.7;
        "ILambda.*"    0.7;
        Qr              0.7;
    }
}

// ************************************************************************* //


simrego August 12, 2019 09:21

So for p you can use calculated. The solver solves for p_rgh, and calculate p from p_rgh. So just let the solver to calculate everything for p.
For p_rgh, you should set the initial values to 1 bar since this is your operating pressure, and it can speed up the convergence if you have a better guess with the initial values.
Just replace every uniform 0; to uniform 100000; in the p_rgh sub-dictionary



You don't need rho because of that line:
equationOfState perfectGas;

with this model you calculate rho from molweight, temperature, and pressure. This is accurate but it can be unstable.
Your fvSolution seems fine, but your rhoMin and rhoMax will maked you mad. air density will be around 1, but you limit it between 700-1200. You can comment that lines out and use the limiter only if your density blows up (if during the solution you will have really large or small densities).
And you could use smaller relaxation factors. These kind of problems can be really unstable (bad convergence).

Raza Javed August 12, 2019 09:55

Quote:

Originally Posted by simrego (Post 741856)
So for p you can use calculated. The solver solves for p_rgh, and calculate p from p_rgh. So just let the solver to calculate everything for p.
For p_rgh, you should set the initial values to 1 bar since this is your operating pressure, and it can speed up the convergence if you have a better guess with the initial values.
Just replace every uniform 0; to uniform 100000; in the p_rgh sub-dictionary



You don't need rho because of that line:
equationOfState perfectGas;

with this model you calculate rho from molweight, temperature, and pressure. This is accurate but it can be unstable.
Your fvSolution seems fine, but your rhoMin and rhoMax will maked you mad. air density will be around 1, but you limit it between 700-1200. You can comment that lines out and use the limiter only if your density blows up (if during the solution you will have really large or small densities).
And you could use smaller relaxation factors. These kind of problems can be really unstable (bad convergence).


I changed the boundary conditions for p and p_rgh like below:


Code:

p_rgh
{
    internalField  uniform 100000;

    boundaryField
    {

        defaultFaces
        {
            type            fixedFluxPressure;
            value          uniform 100000;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value          uniform 100000;
        }
    }
}

p
{
    internalField  uniform 100000;

    boundaryField
    {
        ".*"
        {
            type            calculated;
            value          uniform 100000;
        }
    }
}


First I tried putting 0 value in p instead of 100000, but then the solver was giving error, then I changed that also to 100000 like p_rgh. Is this correct?



And I removed those two lines for rhomin and rhomax from fvSolutions.

simrego August 12, 2019 10:14

Yes, it should.
It crashed because of your "density model" i think.
you set the p for 0. For the first time it will tries to calculate the density as:
rho = p/(R*T)
With 0 p you will get 0 density. And everything goes wrong.

In the next step it should be fine since p is recalculated from p_rgh and it will be correct. But you can't get there since you failed already.
So 1bar for p is correct, but doesn't really matter since it is just an initial value. Just survive the first few iterations! :D


And now your case is running?

Raza Javed August 12, 2019 10:31

Quote:

Originally Posted by simrego (Post 741860)
Yes, it should.
It crashed because of your "density model" i think.
you set the p for 0. For the first time it will tries to calculate the density as:
rho = p/(R*T)
With 0 p you will get 0 density. And everything goes wrong.

In the next step it should be fine since p is recalculated from p_rgh and it will be correct. But you can't get there since you failed already.
So 1bar for p is correct, but doesn't really matter since it is just an initial value. Just survive the first few iterations! :D


And now your case is running?


Yes. with the initial values and boundary conditions I attached in the last post, the solver is running.


I am sorry I have one another question related to fvOptions. In my heater region inside the air region, I am putting power using fvOptions file. I want to put 10W of power in that. The volume of my heater region is 1e-12 cubic meter. What value should I write in fvOptions if I am using specific volume mode?



shall I divide 10 watts with the volume of heater and then put the result in fvOptions?


Code:

heatSource
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode  all; // all, cellSet, cellZone, points
      // cellZone        hot;       
        //cellSet        c1;
        volumeMode      specific; // absolute;
        injectionRateSuSp
        {
            h    (1e13 0);
        }
    }
}


simrego August 12, 2019 10:35

Feel free to ask. If i can i'll try to help you :)
There is a simpler solution. Set the volumeMode to absolute. So you can simply write 10.
https://openfoam.com/documentation/guides/latest/api/classFoam_1_1fv_1_1SemiImplicitSource.html#details

:
Valid options for the volumeMode entry include:
  • absolute: values are given as <quantity>
  • specific: values are given as <quantity>/m3

simrego August 12, 2019 10:37

But to answer your question. in specific mode you just have to divide 10 W with the volume. So 1e13 seems correct. But I suggest you to let the solver calculate these thing so you'll have less sources for the mistakes. :)

Raza Javed August 13, 2019 04:25

Quote:

Originally Posted by simrego (Post 741865)
But to answer your question. in specific mode you just have to divide 10 W with the volume. So 1e13 seems correct. But I suggest you to let the solver calculate these thing so you'll have less sources for the mistakes. :)


Thank you. I did and now the solver is running. :)


Please correct me where I am wrong.


So, till here the solver is running with a heater inside air, and we put p_rgh and p equals to 1 bar.


Now, I need to change this air to vacuum, so I must decrease the pressure. I cannot put zero for p because then the solver stops.


So can I put p_rgh equals to zero, and p equals to very very small value for vacuum?


And in the U sub-dictionary, do I need to put some value for the velocity also?


Thank you

simrego August 13, 2019 05:11

I don't think if you can set zero pressure with this solver. I think this is not suitable for that. You can use small pressure, but with 0 I think it will blow up. But you can give it a try.
If you need a different pressure, just set it in the fvSolution file, and correct the p_rgh and p field to the same pressure (Again in the p_rgh and p files you just giving initial values, they shouldn't affect the solution.)
And if you decrease the pressure, you have to correct the material properties of the air to that pressure and temperature. Since the properties of air are depends on the pressure and temperature.
You can leave U as it is. You will have some air motion. Or you can set a "frozenFlow yes;" flag in the "air/fvSolution/SIMPLE", and you will solve only the energy equation, thus the velocity and pressure field will be the initialized value during the solution, so if you set 0 velocity, you will have only radiation, and conduction through the air.

Raza Javed August 13, 2019 05:32

Quote:

I don't think if you can set zero pressure with this solver. I think this is not suitable for that. You can use small pressure, but with 0 I think it will blow up. But you can give it a try.

I put everything zero like below:


Code:

p_rgh
{
    internalField  uniform 0;

    boundaryField
    {

        defaultFaces
        {
            type            fixedFluxPressure;
            value          uniform 0;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value          uniform 0;
        }
    }
}

p
{
    internalField  uniform 0;

    boundaryField
    {
        ".*"
        {
            type            calculated;
            value          uniform 0;
        }
    }
}


and I got the following error:


Code:

Time = 0.1


Solving for fluid region vacuum
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#5  Foam::fluidThermo::nu() const at ??:?
#6  Foam::laminar<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > >::nuEff() const at ??:?
#7  Foam::linearViscousStress<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > >::divDevRhoReff(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const at ??:?
#8  ? at ??:?
#9  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10  ? at ??:?
Floating point exception (core dumped)


Quote:

If you need a different pressure, just set it in the fvSolution file, and correct the p_rgh and p field to the same pressure (Again in the p_rgh and p files you just giving initial values, they shouldn't affect the solution.)

where in fvSolution I can put pressure? at pRefValue?

In the fvSolution file, I will put p or p_rgh ?




Quote:

And if you decrease the pressure, you have to correct the material properties of the air to that pressure and temperature. Since the properties of air are depends on the pressure and temperature.

You mean to say that I need to change the values mentioned below with the new small pressure I will put?


Code:

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

mixture
{
    specie
    {
        nMoles          1;
        molWeight      28.9;
    }
    thermodynamics
    {
        Cp              1000;
        Hf              0;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}


simrego August 13, 2019 05:46

Yes this error is a figFpe, you have a division with 0 somewhere. Probably because of that 0 pressure.


Sorry, yes. Only the pRefValue have to be modified. You don't have to put anything else in the fvSolution, only modify the pRefvalue.


Yes you have to modify them. I think Pr=0.7 is only valid for air on atmospheric pressure and ~300 K. Also check the viscosity. But if you use frozenFlow maybe the viscosity is redundant.

Raza Javed August 13, 2019 05:55

Quote:

Sorry, yes. Only the pRefValue have to be modified. You don't have to put anything else in the fvSolution, only modify the pRefvalue.

Ok. for example: if I put pRefValue=2.5, then I have to change p and p_rgh in changeDictionaryDict to 2.5 also?

Raza Javed August 13, 2019 06:21

Quote:

Yes you have to modify them. I think Pr=0.7 is only valid for air on atmospheric pressure and ~300 K

I have checked about the Pr value for small pressure, but couldn't find it. and Pr is also not directly dependent on pressure,

Is there anyway to find Pr for different pressures?

simrego August 13, 2019 06:21

Okay so to clarify. You have a closed domain, so you must define a pressure somewhere. This is what you are doing in the fvSolution file. for the cell with id 0, you define a pressure with 2.5 pascal.
In the p_rgh file what you are setting in your case are only initial values. Also for p. Since you set the pressure to 2.5 pascal in that cell in your domain, you can assume that the pressure will be ~2.5 pascal in the whole domain. That's why it is suggested (not a must, but strongly suggested) to initialize p_rgh and p with that 2.5 pascal to help the convergence of the solver.

simrego August 13, 2019 06:25

Quote:

Originally Posted by Raza Javed (Post 741955)
I have checked about the Pr value for small pressure, but couldn't find it. and Pr is also not directly dependent on pressure,

Is there anyway to find Pr for different pressures?


Pr is not directly, but it is calculated from the conductivity, viscosity, and specific heat. And they can depend. I'm not 100% if the Pr of air in that really small pressure is the same than on atmospheric pressure. You have to check it before you get unreal results because of that really simple mistake (wrong material props).

Raza Javed August 13, 2019 06:29

Quote:

Originally Posted by simrego (Post 741956)
Okay so to clarify. You have a closed domain, so you must define a pressure somewhere. This is what you are doing in the fvSolution file. for the cell with id 0, you define a pressure with 2.5 pascal.
In the p_rgh file what you are setting in your case are only initial values. Also for p. Since you set the pressure to 2.5 pascal in that cell in your domain, you can assume that the pressure will be ~2.5 pascal in the whole domain. That's why it is suggested (not a must, but strongly suggested) to initialize p_rgh and p with that 2.5 pascal to help the convergence of the solver.




If I understood right, this is what I did:


fvSolutions:



Code:

solvers
{
    rho
    {
        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;

        maxIter          10;
    }

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

SIMPLE
{
    momentumPredictor on;
    nNonOrthogonalCorrectors 2;
    pRefCell        0;
    pRefValue      2.5;
    //rhoMin          rhoMin [1 -3 0 0 0] 700;
    //rhoMax          rhoMax [1 -3 0 0 0] 1200;
}

relaxationFactors
{
    fields
    {
        rho            1;
        p_rgh          0.7;
    }
    equations
    {
        U              0.7;
        h              0.7;
        nuTilda        0.7;
        k              0.7;
        epsilon        0.7;
        omega          0.7;
        "ILambda.*"    0.7;
    }
}

// ************************************************************************* //


and


changeDictionaryDict:


Code:

p_rgh
{
    internalField  uniform 2.5;

    boundaryField
    {

        defaultFaces
        {
            type            fixedFluxPressure;
            value          uniform 2.5;
        }

        ".*"
        {
            type            fixedFluxPressure;
            value          uniform 2.5;
        }
    }
}

p
{
    internalField  uniform 2.5;

    boundaryField
    {
        ".*"
        {
            type            calculated;
            value          uniform 2.5;
        }
    }
}


I hope this is correct now?

simrego August 13, 2019 07:13

Yep, seems fine.

Raza Javed August 20, 2019 04:53

Hi..


Hope you will be fine.


I have question related to fvOptions. If I am using fvOptions to put power in one volume, then what exactly this power is? Is this a power dissipation of that object?


And how can I calculate that with this power, what would be the temperature of my object?


Thank you

Raza Javed August 23, 2019 04:42

Quote:

Originally Posted by simrego (Post 741850)
In this solver the calculated pressure field is p_rgh. p is calculated from p_rgh. You should just set calculated BC for every p field. Also these values are only the initial values. In your air/fvSolution file you have to define a reference cell, and a referecne pressure. You can set it to 1bar if your pressure is 1 bar in the domain.
For the material properties you can use what you want, but you need a temperature dependent density. You will have some convective heat transfer. In the U file all you do is set the velocity on the boundaries to zero, which is correct for a wall. But in the domain you will have non zero velocities. (nonuniform temperature field -> nonuniform density -> fluid will start moving.)


Hello,


I have one question here:


How can I find the referenceCell to put in the fvOptions?


for example, in my case, I want to have 1e-5 pascal pressure on the complete AIR domain. so how can I put that?


I shall be very thankful if you can help.


Thank you

simrego August 23, 2019 05:02

Hi!


If you solve the flow equations, you cant. But as i mentioned earlier you can use frozenFlow in your fvSolution of air and you won't solve any flow equations. Just initialize the domain with that 1e-5 pascal, and zero velocity, and that's all. It won't change since you won't solve any flow equations, only the energy equation.

Raza Javed August 23, 2019 05:20

Quote:

Originally Posted by simrego (Post 742893)
Hi!


If you solve the flow equations, you cant. But as i mentioned earlier you can use frozenFlow in your fvSolution of air and you won't solve any flow equations. Just initialize the domain with that 1e-5 pascal, and zero velocity, and that's all. It won't change since you won't solve any flow equations, only the energy equation.


Thank you so much for your reply.


Yes. I did that frozen flow, and Now the solver is not solving any flow equation. Good.


Now, I reduced the pressure to a very low value for Air, to generate a vacuum. But the results after this remain exactly the same. There is no difference in the temperature gradient as with the high temperature (1 bar).


I checked for the prandtl number also, and It doesn't actually change so much with the pressure (its range is approximately 0.7 to 0.8).


But I don't know, how the behavior of temperature could be same even with so less pressure?


Thank you

simrego August 23, 2019 05:39

Of course they remain the same with lower pressure. Check the energy equation what you are solving. It is not affected by the pressure.
BUT since you decrease the pressure your material props must change I think, since you have much less air particles. The thermal conductivity of the air will decreasing really fast as you decrease the pressure. In a really high vacuum you will have nearly 0 thermal conductivity.
Maybe it is not significant from 1bar to 10. But when you go down from 1 bar to 1e-5 Pa, it should be.

Raza Javed August 23, 2019 06:27

Quote:

Originally Posted by simrego (Post 742900)
Of course they remain the same with lower pressure. Check the energy equation what you are solving. It is not affected by the pressure.
BUT since you decrease the pressure your material props must change I think, since you have much less air particles. The thermal conductivity of the air will decreasing really fast as you decrease the pressure. In a really high vacuum you will have nearly 0 thermal conductivity.
Maybe it is not significant from 1bar to 10. But when you go down from 1 bar to 1e-5 Pa, it should be.




Thank you so much for your response. It is helpful.


One more question here, Is it possible to use P1 model for Air in my case?


I tried P1 model and it is showing that the Air gets hot faster as compared to the case if I don't use radiation.



I think this behaviour is correct? or NOT?


Thank you

simrego August 23, 2019 07:27

Not really. P1 is good for optically thick media. For air it is not.
It became hot faster because i think you had wrong coefficients for your absorption emission model and the air is absorbed a lot of heat which is not correct since air is "transparent". The radiation should just go through the air without absorption/emission... That's why viewFactor model is the best choice for you I think.

Raza Javed August 23, 2019 10:13

Quote:

Originally Posted by simrego (Post 742913)
Not really. P1 is good for optically thick media. For air it is not.
It became hot faster because i think you had wrong coefficients for your absorption emission model and the air is absorbed a lot of heat which is not correct since air is "transparent". The radiation should just go through the air without absorption/emission... That's why viewFactor model is the best choice for you I think.

Ok good. So what would be the difference when we put radiations?
Because I don’t know what I should see to make it sure that my radiation is working fine.?

Thank you.

Raza Javed August 26, 2019 03:52

Quote:

Originally Posted by simrego (Post 742913)
Not really. P1 is good for optically thick media. For air it is not.
It became hot faster because i think you had wrong coefficients for your absorption emission model and the air is absorbed a lot of heat which is not correct since air is "transparent". The radiation should just go through the air without absorption/emission... That's why viewFactor model is the best choice for you I think.




I have read in forum that If I want to check that my radiation model is working or NOT, then I must use wallHeatFlux utility on each boundary. but I don't know about that.


Can you please help me in this?


Thank you

simrego August 26, 2019 04:11

Yes, this is a good idea :D
run this (I hope i have no typo, and replace the regionName and numberOfProcessors to your needs):
chtMultiRegionSimpleFoam -postProcess -func wallHeatFlux -region regionName -latestTime


or in parallel:
mpirun -np numberOfProcessors chtMultiRegionSimpleFoam -parallel -postProcess -func wallHeatFlux -region regionName -latestTime



But you have to run it in on the case with and without radiation so you can see the difference.

Raza Javed August 26, 2019 04:15

Quote:

Originally Posted by simrego (Post 743056)
Yes, this is a good idea :D
run this (I hope i have no typo, and replace the regionName and numberOfProcessors to your needs):
chtMultiRegionSimpleFoam -postProcess -func wallHeatFlux -region regionName -latestTime


or in parallel:
mpirun -np numberOfProcessors chtMultiRegionSimpleFoam -parallel -postProcess -func wallHeatFlux -region regionName -latestTime



But you have to run it in on the case with and without radiation so you can see the difference.




DO I need to install anything or configure any library etc before doing this? OR I can directly do this?


Quote:

chtMultiRegionSimpleFoam -postProcess -func wallHeatFlux -region regionName -latestTime

Raza Javed August 26, 2019 04:17

Quote:

Originally Posted by simrego (Post 743056)
Yes, this is a good idea :D
run this (I hope i have no typo, and replace the regionName and numberOfProcessors to your needs):
chtMultiRegionSimpleFoam -postProcess -func wallHeatFlux -region regionName -latestTime


or in parallel:
mpirun -np numberOfProcessors chtMultiRegionSimpleFoam -parallel -postProcess -func wallHeatFlux -region regionName -latestTime



But you have to run it in on the case with and without radiation so you can see the difference.


because some people are saying that something should be added in controlDict in functions etc etc. but I didn't use it, so I don't have any idea.

Raza Javed August 26, 2019 04:24

I RAN it and it gave me the following error:


Code:

Create time

Create fluid mesh for region air for time = 28.5

Create solid mesh for region heater for time = 28.5

--> FOAM Warning :
    From function static bool Foam::functionObjectList::readFunctionObject(const Foam::string&, Foam::dictionary&, Foam::HashSet<>&, const Foam::word&)
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 245
    Cannot find functionObject file wallHeatFlux
Time = 28.5
*** Reading fluid mesh thermophysical properties for region air

    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 to hRefFluid

    Adding to ghFluid

    Adding to ghfFluid

    Adding to turbulence

Selecting turbulence model type laminar
Selecting radiationModel viewFactor
Selecting absorptionEmissionModel constantAbsorptionEmission
Selecting scatterModel none
Selecting sootModel none
    Adding MRF

No MRF models present

    Adding fvOptions

No finite volume options present

*** Reading solid mesh thermophysical properties for region heater

    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


End


simrego August 26, 2019 04:43

What version of OF are you using?
You don't need anything for that. It should works:
You can also do it in the controlDict file like this (but this is the same function call):

https://openfoam.com/documentation/g...x.html#details

Raza Javed August 26, 2019 04:53

Quote:

Originally Posted by simrego (Post 743065)
What version of OF are you using?
You don't need anything for that. It should works:
You can also do it in the controlDict file like this (but this is the same function call):

https://openfoam.com/documentation/g...x.html#details


I did the following:


In the controlDict I put:


Code:

functions
{
      #include wallHeatFlux(region=air)
}

and then I used the following


Code:

wallHeatFlux -region air -latestTime

And it Works :)


But on the air_to_heater interface, it is also showing some convection also. even After I am using frozenFlow=Yes


Thank you

simrego August 26, 2019 05:23

I think you see some conduction through the air.


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