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

scalarSemiImplicitSource

Register Blogs Community New Posts Updated Threads Search

Like Tree8Likes
  • 2 Post By samiahmed
  • 5 Post By clapointe
  • 1 Post By samiahmed

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2019, 11:18
Default scalarSemiImplicitSource
  #1
New Member
 
Join Date: Jun 2019
Posts: 15
Rep Power: 7
samiahmed is on a distinguished road
Hello
The following might be obvious but I cannot really understand how it works.

In fvOptions to create a scalarSemiImplicitSource we have to define some keywords:

volumeMode as either specific or absolute.
In the documentation they state that when choosing absolute, then the units are <quantity> and if specific is used then the units are <quantity>/m^3

Could you please give more details on how this works?

Here is an example that confuses me,
Let's consider the steady heat transfer problem in 1D rod given by the equation:
D_T{\partial^2 T \over \partial x^2} + S = 0

Where S is the thermal diffusivity with units m^2/s. T is the temperature field in kelvins (K), and S is the source term with units K/s.
at x = 0 we have T = T_1 and at x = L, T = T_2. The solution is then given by:

T(x) = -{S \over 2 D_T}x^2 + \left( {T_2 - T_1 \over L} + {S\cdot L\over 2 D_T} \right)x + T_1

For instance, let S = 100 K/s, L = 2, T_1 = 500K and T_2 = 400 K. and D_T = 1 m^2/s
In OpenFOAM fvOptions:

Code:
mySource
{
        type    scalarSemiImplicitSource;
        active  true;

        scalarSemiImplicitSourceCoeffs
        {
                selectionMode   all;
                //cellZone      heatSourceRegion;
                volumeMode              specific;
                injectionRateSuSp
                {
                        T       (100 0);
                }
        }

}
In OpenFOAM I noticed that in order to get the correct results (compared to the analytical solution) I must use volumeMode as specific instead of absolute (using absolute gives me wrong results).

Could you please why this works? because the units of S are not by units of volume!!!!

I don't know exactly what OpenFOAM changes in the equation when I use (specific/absolute)

Last edited by samiahmed; June 27, 2019 at 12:27.
samiahmed is offline   Reply With Quote

Old   June 30, 2019, 15:06
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 15
clapointe is on a distinguished road
Specific vs absolute is used in a variety of places, and converting from one to the other is done by dividing/multiplying by volume. Without even looking at the source code, it is straightforward to see how the magnitude of the source would change. Two (arbitrary) examples :

1 : Volume of 1 cubic meter, with source of 100 K. The absolute source value is 100K and specific source value 100K/m^3

2 : Volume of 0.25 cubic meter, with source of 100K. The absolute source value is still 100K, but specific value is now 400k/m^3.

So the magnitude of the source will change to get the same effect depending on whether absolute or specific is selected.

So for your case I suspect that 100K/m^3 ended up working out, but an absolute value of 100K did not.

Caelan
clapointe is offline   Reply With Quote

Old   June 30, 2019, 15:45
Default
  #3
New Member
 
Join Date: Jun 2019
Posts: 15
Rep Power: 7
samiahmed is on a distinguished road
Thank you very much for your reply. I think I got it.
samiahmed is offline   Reply With Quote

Reply


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



All times are GMT -4. The time now is 20:06.