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

energy equation for porousSimpleFoam

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 26, 2013, 12:41
Default energy equation for porousSimpleFoam
  #1
Senior Member
 
mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 125
Rep Power: 12
m5m5kh is on a distinguished road
Hi dear foamers
I do not know how to add an energy equation to my solver (porousSimpleFoam).my flow is incompressible and I do not know how to add TEqn.H to my own solver.what should I do with (rho of fluid, Cp of it and also Sigma,k and q"') ? while the equation the equation is something like this:

rho(fluid)*Cp(fluid)[sigma dt/dt + Udt/dx]=k d2T/dx2 + q'" + (mu/K) u^2

Sigma = [porosity(rho*cp)f+(1-porosity)*(rhoc)s]/(rho*cp)f

q"' = (1- porosity) q'"s

k= (porosity*kf) + (1- porosity)*ks

please help me.



fvScalarMatrix TEqn
(
fvm::ddt(T)
+fvm::div(phi,T)
-fvm::laplacian(alpha,T)
);


TEqn.solve();


what should I do with these kf,ks,.... how and where should I define them?
Just right them in transportProperties in constant folder?

Best regards
Mohsen
m5m5kh is offline   Reply With Quote

Old   August 31, 2013, 00:50
Default energy equation for porousSimpleFoam
  #2
Senior Member
 
mohsen kh
Join Date: Jan 2013
Location: Iran
Posts: 125
Rep Power: 12
m5m5kh is on a distinguished road
hi dear Foamers

has anyone write this equation for his/her solver?
I need emergent help in this case.
I understand how to define my porous zone
I want to add the energy equation to my solver
I did it but didn't work
I am here to ask you if you would help me or not
I'm looking forward to your reply my friend
I hope you can help me by your useful comments
my equation is something like this

rho(fluid)*Cp(fluid)[sigma dT/dt + UdT/dx]=k d2T/dx2 + q'" + (mu/K) u^2

Sigma = [porosity(rho*cp)f+(1-porosity)*(rhoc)s]/(rho*cp)f

q"' = (1- porosity) q'"s

k= (porosity*kf) + (1- porosity)*ks

I also don't know how and where to define sigma,k...

best regards
Mohsen
m5m5kh is offline   Reply With Quote

Old   August 31, 2013, 09:04
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Mohsen,

Have a look into the solver rhoPorousSimpleFoam. The source code for it is located at "applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/". You can see the full path to it by running:
Code:
echo $FOAM_SOLVERS/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/
This solver relies on enthalpy/energy exchanges, as solved in the file "EEqn.H". From it you can extract the current temperature from the "he" variable... although I'm not sure how exactly .
Or you can modify this equation to work the other way around, namely to solve the temperature and then calculate whatever else is needed.

Good luck! Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 23, 2019, 03:57
Default
  #4
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi all,

I am also working with same condition as yours.
Now i am moving to heat transfer problem with porous media.
May i know how to add energy equation with porousSimpleFoam solver case??

Thanks in advance,
Vishsel
Vishsel is offline   Reply With Quote

Old   August 25, 2019, 08:53
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: In the current/modern OpenFOAM solvers, you can add porous mediums on any solver, without the need to modify the solver. See for example: https://openfoamwiki.net/index.php/DarcyForchheimer
__________________
wyldckat is offline   Reply With Quote

Old   August 26, 2019, 01:56
Default
  #6
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi Bruno,

Thank you for your reply.
Actually my case is HX which has solid parts and fluid domains.
I need to find out heat transfer, for that i need to include energy equation to porousSimpleFoam solver(my case). How can i add energy equation to my case??
And How to create heat source in openfoam for my case??

Thank you,
Vishsel
Vishsel is offline   Reply With Quote

Old   August 26, 2019, 17:06
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick question: Which OpenFOAM version are you using?
wyldckat is offline   Reply With Quote

Old   August 26, 2019, 22:12
Default
  #8
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi bruno,

I am using openfoam 2.3 version. I need to apply a heat source at wall BC and to see the distribution of heat.

Last edited by Vishsel; August 27, 2019 at 03:42.
Vishsel is offline   Reply With Quote

Old   August 27, 2019, 19:03
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,962
Blog Entries: 45
Rep Power: 125
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: In OpenFOAM 2.3 you have the tutorial case "heatTransfer/chtMultiRegionSimpleFoam/heatExchanger" and demonstrates what you want to do, namely having heat exchange and a porous region.
wyldckat is offline   Reply With Quote

Old   August 28, 2019, 02:07
Default
  #10
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi bruno,

Thank you for your reply.

Thank you in advance
Vishsel

Last edited by Vishsel; August 30, 2019 at 00:53.
Vishsel is offline   Reply With Quote

Old   August 29, 2019, 09:33
Default
  #11
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi bruno,

Thank you for your reply.
Actually my need is to generate a heat at surface (i.e @solid wall BC).

I have an input like heat flux value, heat generation value in W and how can i give heat flux or heat generation value in fvOptions file.

And I have an another doubt, for my case whether i have to use type
1)scalarSemiImplicitSource (or)
2)externalWallHeatFluxTemperature in fvOptions

and what are all the changes in fvSchemes & fvSolution files ??And this is my fvOptions file and values 50,137.5 are in watts
Code:
wall-dp-1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (50 0);
        }
    }
}
wall-dp-2
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (50 0);
        }
    }
}
wall-mp-1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (137.5 0);
        }
    }
}
wall-mp-2
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (137.5 0);
        }
    }
}
It might be wrong in fvSchemes, because solver for ''h'' is not running. Solving iterations are shown below

Code:
Creating finite volume options from fvOptions

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-mp-1
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-mp-2
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-dp-1
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-dp-2
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

No MRF models present

Creating porosity model list from porosityProperties

Porosity region f-turbo:
    selecting model: DarcyForchheimer
    creating porous zone: f-turbo
Using pressure explicit porosity

Starting time loop



Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.000941837, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000384228, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.000471979, No Iterations 2
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0245239, No Iterations 11
time step continuity errors : sum local = 0.00735485, global = -9.97032e-005, cumulative = -9.97032e-005
smoothSolver:  Solving for epsilon, Initial residual = 0.065236, Final residual = 4.46237e-005, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.00172232, No Iterations 2
ExecutionTime = 24.492 s  ClockTime = 25 s
fvSchemes

Code:
ddtSchemes
{
    default         steadyState;
}

gradSchemes
{
    default         Gauss linear;
}

divSchemes
{
    default         none;
    div(phi,U)      bounded Gauss upwind;
    div(phi,h)      bounded Gauss upwind;
    div(phi,e)      bounded Gauss upwind;
    div(phi,Ekp)    bounded Gauss upwind;
    div(phi,K)      bounded Gauss upwind;
    div(phi,k)      bounded Gauss upwind;
    div(phi,epsilon) bounded Gauss upwind;
    div((nuEff*dev(T(grad(U))))) Gauss linear;
}

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

interpolationSchemes
{
    default         linear;
}

snGradSchemes
{
    default         uncorrected;
}

fluxRequired
{
    default         no;
    p               ;
}
fvSolution

Code:
solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.05;
        smoother        GaussSeidel;
        cacheAgglomeration on;
        nCellsInCoarsestLevel 20;
        agglomerator    faceAreaPair;
        mergeLevels     1;
    }

    "(U|k|epsilon)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        nSweeps         2;
        tolerance       1e-07;
        relTol          0.1;
    }
    h
    {
        solver           PCG;
        preconditioner   DIC;
        tolerance        1e-06;
        relTol           0.1;
        minIter          1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
}

relaxationFactors
{
    fields
    {
        p           0.7;
    }
    equations
    {
        U               0.3;
        h                0.3;
        k               0.3;
        epsilon         0.3;
    }
}



Is it correct?? if it is wrong please correct me..


Thank you in advance
Vishsel
Vishsel is offline   Reply With Quote

Old   August 30, 2019, 05:55
Default
  #12
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 4
priyankap is on a distinguished road
Quote:
I have an input like heat flux value, heat generation value in W and how can i give heat flux or heat generation value in fvOptions file.
1.if you use,


Code:
volumeMode      specific; // absolute;
then you must calculate the value of 'h' using your power, which I can see is your case.


To calculate the value of 'h' you must divide the total volume where you want to apply this heat to the power in watts.


for example:


for your
Code:
wall -dp -1
in the log that you have attached the volume is

Code:
0.000333435
so the value of h would be,


Code:
p(W)/volume i.e.  50,137.5 (in watts)/0.000333435
2. scalarSemiImplicitSource should be OK because that works for most of the cases in heat transfer

3. You don't really have to change anything in fvschemes and fvSolution for now and changes in fvSolution depends on your mesh quality etc.



I also dont have much knowledge about different schemes and solvers. I can only help you with those that I have used so far.


Hope it helps!
priyankap is offline   Reply With Quote

Old   August 30, 2019, 06:49
Default
  #13
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi,

Thankyou so much for your reply.

I am getting this error while running. Why iam getting this error??


Code:
Creating finite volume options from fvOptions

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-mp-1
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-mp-2
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-dp-1
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-dp-2
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

No MRF models present

Creating porosity model list from porosityProperties

Porosity region f-turbo:
    selecting model: DarcyForchheimer
    creating porous zone: f-turbo
Using pressure explicit porosity

Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.000941837, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000384228, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.000471979, No Iterations 2
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0245239, No Iterations 11
time step continuity errors : sum local = 0.00735485, global = -9.97032e-005, cumulative = -9.97032e-005
smoothSolver:  Solving for epsilon, Initial residual = 0.065236, Final residual = 4.46237e-005, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.00172232, No Iterations 2
ExecutionTime = 24.186 s  ClockTime = 24 s

Time = 2

--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-2 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-2 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-2 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-2 defined for field h but never used
smoothSolver:  Solving for Ux, Initial residual = 0.198925, Final residual = 0.000183157, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.419724, Final residual = 0.000232691, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.562048, Final residual = 0.000382205, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.679735, Final residual = 0.027343, No Iterations 3
time step continuity errors : sum local = 1.36223, global = 0.0140221, cumulative = 0.0139224
smoothSolver:  Solving for epsilon, Initial residual = 0.0114781, Final residual = 1.76928e-005, No Iterations 2
bounding epsilon, min: -98.6398 max: 65049.1 average: 526.345
smoothSolver:  Solving for k, Initial residual = 0.581875, Final residual = 0.000814592, No Iterations 2
ExecutionTime = 38.45 s  ClockTime = 38 s
This is my fvOptions file: I don't have much knowledge about this. Please correct me..

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

wall-mp-1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (149954.264 0);
        }
    }
}
wall-mp-2
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (149954.264 0);
        }
    }
}
wall-dp-1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (412374.225 0);
        }
    }
}
wall-dp-2
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
 
    scalarSemiImplicitSourceCoeffs
    {
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (412374.225 0);
        }
    }
}

wall-mp-1
{
    type              scalarCodedSource;
    active          true;
    selectionMode   all;
    
    
       scalarCodedSourceCoeffs
    {     
         
         name            sourceTime;
         fieldNames      (h);

        codeInclude
        #{

        #};

        codeCorrect
        #{
            Pout<< "**codeCorrect**" << endl;
        #};

        codeAddSup  //major problem under this
        #{
            const volScalarField& Tm = mesh_.lookupObject<volScalarField>("T"); 
            Tvol = Tm.weightedAverage(mesh_.V()).value();                //averageValue of the volScalarField
            const vectorField& C = mesh_.C();                    //List of cellcentres
            const scalarField& V = mesh_.V();
            scalarField& hSource = eqn.source();                //defining source
            forAll(C, i)
            {
                hSource[i] = ???? ; // May i know how to write the hSource??
            }
            Pout << "***codeAddSup***" << endl;
        #};

        codeSetValue
        #{
            Pout<< "**codeSetValue**" << endl;
        #};

        // Dummy entry. Make dependent on above to trigger recompilation
        code
        #{
            $codeInclude
            $codeCorrect
            $codeAddSup
            $codeSetValue
        #};
    }

    sourceTimeCoeffs
    {
         $scalarCodedSourceCoeffs;
    }
}
About my case .. please see above post..



Thankyou in advance
Vishnu

Last edited by Vishsel; August 30, 2019 at 09:58.
Vishsel is offline   Reply With Quote

Old   August 30, 2019, 09:31
Default
  #14
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 4
priyankap is on a distinguished road
What is wall -mp 1 , wall -dp 1 etc in your case?


And where are you defining it?
priyankap is offline   Reply With Quote

Old   August 30, 2019, 09:53
Default
  #15
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi,

Those are all the boundary surface.. i need to generate the heat source on that surface of the wall
wall-mp-1
wall-mp-2
wall-dp-1
wall-dp-2
Vishsel is offline   Reply With Quote

Old   September 2, 2019, 05:10
Default
  #16
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 4
priyankap is on a distinguished road
I have only generated heat source on a body, but as far as I know to generate heat source on the surface you can directly assign the heat source on that particular surface as below:


Code:
heatSource
{
    type            scalarSemiImplicitSource;
    active          true;
 
    scalarSemiImplicitSourceCoeffs
    {
        selectionMode   all; // all,
       // cellZone        hot;      // Use this  create hea source on a particular region
  

      //cellSet         c1;  // you can define a faceSet and use cellSet for a surface


        volumeMode      specific; // absolute;
        injectionRateSuSp
        {
            h     (46428571.43 0);
        }
    }
}
you can create faceSet using 'topoSet' utility of OpenFoam.
priyankap is offline   Reply With Quote

Old   September 3, 2019, 06:07
Default
  #17
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Hi all,

Thankyou for your solution. @priyanka

But still i am getting this error. And solver for ''h'' is not running.

Code:
Creating finite volume options from fvOptions

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-mp-1
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-mp-2
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-dp-1
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

Selecting finite volume options model type scalarSemiImplicitSource
    Source: wall-dp-2
    - applying source for all time
    - selecting all cells
    - selected 5338536 cell(s) with volume 0.000333435

No MRF models present

Creating porosity model list from porosityProperties

Porosity region f-turbo:
    selecting model: DarcyForchheimer
    creating porous zone: f-turbo
Using pressure explicit porosity

Starting time loop

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.000941837, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.000384228, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 1, Final residual = 0.000471979, No Iterations 2
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0245239, No Iterations 11
time step continuity errors : sum local = 0.00735485, global = -9.97032e-005, cumulative = -9.97032e-005
smoothSolver:  Solving for epsilon, Initial residual = 0.065236, Final residual = 4.46237e-005, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 1, Final residual = 0.00172232, No Iterations 2
ExecutionTime = 24.831 s  ClockTime = 25 s

Time = 2

--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-2 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-2 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-mp-2 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-1 defined for field h but never used
--> FOAM Warning :
    From function void option::checkApplied() const
    in file fvOptions/fvOption.C at line 368
    Source wall-dp-2 defined for field h but never used
smoothSolver:  Solving for Ux, Initial residual = 0.198925, Final residual = 0.000183157, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.419724, Final residual = 0.000232691, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.562048, Final residual = 0.000382205, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.679735, Final residual = 0.027343, No Iterations 3
time step continuity errors : sum local = 1.36223, global = 0.0140221, cumulative = 0.0139224
smoothSolver:  Solving for epsilon, Initial residual = 0.0114781, Final residual = 1.76928e-005, No Iterations 2
bounding epsilon, min: -98.6398 max: 65049.1 average: 526.345
smoothSolver:  Solving for k, Initial residual = 0.581875, Final residual = 0.000814592, No Iterations 2
ExecutionTime = 39.094 s  ClockTime = 39 s

Time = 3

smoothSolver:  Solving for Ux, Initial residual = 0.0770133, Final residual = 1.89677e-005, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.244463, Final residual = 0.000106983, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.258733, Final residual = 0.000281965, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.692126, Final residual = 0.0184881, No Iterations 3
time step continuity errors : sum local = 0.745246, global = 0.0381094, cumulative = 0.0520318
smoothSolver:  Solving for epsilon, Initial residual = 0.00822483, Final residual = 1.47114e-005, No Iterations 2
smoothSolver:  Solving for k, Initial residual = 0.147117, Final residual = 0.00022013, No Iterations 2
ExecutionTime = 53.177 s  ClockTime = 53 s
and my fvOptions file

Code:
wall-mp-1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
    scalarSemiImplicitSourceCoeffs
    {
        cellZone        wall-mp-1surface;
        cellSet            wall-mp-1;
        volumeMode      specific; 
        injectionRateSuSp
        {
            h     (149954.264 0);
        }
    }
}
wall-mp-2
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
    scalarSemiImplicitSourceCoeffs
    {
        cellZone        wall-mp-2surface;
        cellSet            wall-mp-2;
        volumeMode      specific;
        injectionRateSuSp
        {
            h     (149954.264 0);
        }
    }
}
wall-dp-1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
    scalarSemiImplicitSourceCoeffs
    {
        cellZone        wall-dp-1surface;
        cellSet            wall-dp-1;
        volumeMode      specific;
        injectionRateSuSp
        {
            h     (412374.225 0);
        }
    }
}
wall-dp-2
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   all;
    scalarSemiImplicitSourceCoeffs
    {
        cellZone        wall-dp-2surface;
        cellSet            wall-dp-2;
        volumeMode      specific;
        injectionRateSuSp
        {
            h     (412374.225 0);
        }
    }
}
topoSetDict file
Code:
actions
(
    {
        name    wall-mp-1surface;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name    wall-mp-1;
        }
    }
    {
        name    wall-mp-2surface;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name    wall-mp-2;
        }
    }
    {
        name    wall-dp-1surface;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name    wall-dp-1;
        }
    }
    {
        name    wall-dp-2surface;
        type    faceSet;
        action  new;
        source  patchToFace;
        sourceInfo
        {
            name    wall-dp-2;
        }
    }
    {
        name    wall-mp-1CellSet;
        type    cellSet;
        action  new;
        source  faceToCell;
        sourceInfo
        {
            set wall-mp-1surface;
            option any;
        }
    }
    {
        name    wall-mp-2CellSet;
        type    cellSet;
        action  new;
        source  faceToCell;
        sourceInfo
        {
            set wall-mp-2surface;
            option any;
        }
    }
    {
        name    wall-dp-1CellSet;
        type    cellSet;
        action  new;
        source  faceToCell;
        sourceInfo
        {
            set wall-dp-1surface;
            option any;
        }
    }
    {
        name    wall-dp-2CellSet;
        type    cellSet;
        action  new;
        source faceToCell;
        sourceInfo
        {
            set wall-dp-2surface;
            option any;
        }
    }
);
May i know why i am getting this error ??

Thanks in advance,
Vishnu

Last edited by Vishsel; September 4, 2019 at 02:58.
Vishsel is offline   Reply With Quote

Old   September 3, 2019, 07:06
Default
  #18
Member
 
Priyanka P
Join Date: Apr 2019
Location: Germany
Posts: 40
Rep Power: 4
priyankap is on a distinguished road
I just recalled this,


You want to give power as an input to generate heat on your surfaces


wall-mp-1
wall-mp-2
wall-dp-1
wall-dp-2


Right?

If yes, then as far as I know you can not give power as input to a surface. Power can only be given as an input to a volume which means to a cellZone.


you can give temperature as input to surfaces but not power because it is a volumetric identity.



But maybe you can take opinion from others as I am also not very experienced in OpenFoam.
priyankap is offline   Reply With Quote

Old   September 3, 2019, 08:18
Default
  #19
Member
 
Vishnu
Join Date: May 2019
Location: Tamilnadu, India
Posts: 55
Rep Power: 4
Vishsel is on a distinguished road
Thank you for your reply.

I have an input like heat flux (W/m2) and heat generation (W).
I have taken volume value from
Code:
- selected 5338536 cell(s) with volume 0.000333435
So, that's why i have assigned in W/m3.
But my case was to generate an heat at surface(@wall).
Is it possible to give heat flux (W/m2) and heat generation (W) value as an input ???

Last edited by Vishsel; September 3, 2019 at 09:32.
Vishsel 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
energy equation in rhoCentralFoam nakul OpenFOAM 0 October 10, 2010 16:07
Pohlhausen energy equation MATLAB help abe_cooldude Main CFD Forum 2 May 3, 2010 17:58
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 07:06
How to discretize of energy equation ?? Asghari FLUENT 0 October 12, 2006 09:09
energy equation formulation Pedro Phoenics 1 July 5, 2001 13:17


All times are GMT -4. The time now is 18:24.