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

Heat source using fvOptions in laplacianFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By osha
  • 2 Post By osha

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2014, 08:09
Default Heat source using fvOptions in laplacianFoam
  #1
New Member
 
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 12
osha is on a distinguished road
Hello Foamers,

I am working on a solid conduction problem using laplacianFoam where I wish to add a heat generation term Q [W/m^3] on selected cells (using topoSet) in the mesh. I have modified the laplacianFoam in following way:

Quote:
fvm::ddt(T) - fvm::laplacian(DT, T) - fvOptions(T)
But I need to apply the heat generation term which I intend to keep constant. I am not sure how I achieve that with the above formulation.


After reading on fvOptions, I realized that I could use scalarExplicitSetValue to define a scalar explicit source. But this method will only fix temperature in the selected cellZone whereas I intend to fix the heat generation rate.


I do not intend to define the heat generation region in geometry this is why fvOption is more suitable for my problem. I am looking forward to your insights.

Thank you.
tilasoldo and marcoberna23 like this.
osha is offline   Reply With Quote

Old   July 17, 2014, 10:32
Default searching further ...
  #2
New Member
 
Kalli
Join Date: Jul 2014
Posts: 9
Rep Power: 12
osha is on a distinguished road
As I was digging further I glanced upon semiImplicitSource and tried to use it. I am not sure if my formulation is right as my results are highly non-physical.

Here is what I tried. The heat generation rate Q [W/m^3] can be written as

Quote:
Q=rho*Cp*(T-T_old)
which implies

Quote:
T = T_old + Q/(rho*Cp)
So, I define injectionRateSuSp as

Quote:
T (Q/(rho*Cp) 1<---[for T_old] )
Do you think the above method make sense?

Though, I am not sure as the temperature field gives out unreal numbers. The absolute temperature goes down to 0.

Any insight will be much appreciated.

Thank you.
seungook and marcoberna23 like this.
osha is offline   Reply With Quote

Old   March 21, 2017, 11:32
Default
  #3
CI8
New Member
 
Edoardo Cascioli
Join Date: Mar 2017
Posts: 3
Rep Power: 9
CI8 is on a distinguished road
Send a message via Skype™ to CI8
Have you found another solution? I used scalarExplicitSetValue for the same purpose, but I have also achieved constant temperature field with no iterations for the temperature equation during the simulation. I was intended to set a average temperature field for the energy balance for my cyclic pipe flow case with incompressible fluid.
CI8 is offline   Reply With Quote

Old   March 22, 2017, 09:05
Default
  #4
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hello

I am using semiImplicitSource and I have no problem. If you pay atention

Code:
Description     Semi-implicit source, described using an input dictionary.  The injection     
rate coefficients are specified as pairs of Su-Sp coefficients, i.e.          
\f[
             S(x) = S_u + S_p x         
\f]      
where     
\vartable
         S(x)    | net source for field 'x'
         S_u     | explicit source contribution
         S_p     | linearised implicit contribution     
\endvartable      
Example of the source specification:      
\verbatim
     <Type>SemiImplicitSourceCoeffs
     {         volumeMode      absolute; // specific
         injectionRateSuSp
         {             k           (30.7 0);
             epsilon     (1.5  0);         }
     }
\endverbatim      
Valid options for the \c volumeMode entry include:
     - absolute: values are given as \<quantity\>
     - specific: values are given as \<quantity\>/m3
Once you know your heat source, you should divide by rho and Cp so you get the units of your equation. Take a look in the units of your heat source, if it is absolute (W) or specific (W/m3).

Haveing a fixed heat source, just do as above, set T (Q/(rho*Cp) 0);

PS:hello again Edoardo
agustinvo is offline   Reply With Quote

Old   October 27, 2020, 05:28
Default
  #5
Member
 
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 6
uosilos is on a distinguished road
Quote:
Originally Posted by agustinvo View Post
Hello

I am using semiImplicitSource and I have no problem. If you pay atention

Code:
Description     Semi-implicit source, described using an input dictionary.  The injection     
rate coefficients are specified as pairs of Su-Sp coefficients, i.e.          
\f[
             S(x) = S_u + S_p x         
\f]      
where     
\vartable
         S(x)    | net source for field 'x'
         S_u     | explicit source contribution
         S_p     | linearised implicit contribution     
\endvartable      
Example of the source specification:      
\verbatim
     <Type>SemiImplicitSourceCoeffs
     {         volumeMode      absolute; // specific
         injectionRateSuSp
         {             k           (30.7 0);
             epsilon     (1.5  0);         }
     }
\endverbatim      
Valid options for the \c volumeMode entry include:
     - absolute: values are given as \<quantity\>
     - specific: values are given as \<quantity\>/m3
Once you know your heat source, you should divide by rho and Cp so you get the units of your equation. Take a look in the units of your heat source, if it is absolute (W) or specific (W/m3).

Haveing a fixed heat source, just do as above, set T (Q/(rho*Cp) 0);

PS:hello again Edoardo

I have to use a source, the only data is that it is a ignitor of 10kJ.



I am doing it now as:
Code:
type            semiImplicitSource;

        timeStart       0;
        duration        1;
        selectionMode   cellSet;
        cellSet         ignitionCells;
                
        volumeMode      absolute;
                      
        sources
        {
            h
            {
                explicit 1e4;
                implicit 0;
            }
        }

I'm obtaining so high temperatures, is it being set properly? how can I estimate the duration of the source??
uosilos is offline   Reply With Quote

Reply

Tags
conduction, fvoptions, heat generation rate, laplacianfoam


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
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 10:17
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 06:18
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 14, 2000 00:03
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


All times are GMT -4. The time now is 13:53.