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

Table input for fvOptions with Openfoam v6 and chtmultiregionfoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2021, 13:02
Default Table input for fvOptions with Openfoam v6 and chtmultiregionfoam
  #1
New Member
 
christopher
Join Date: Apr 2017
Posts: 4
Rep Power: 9
cana is on a distinguished road
Hello Foamers,

I am working on a simulation of a battery under load with a a combined air convection and coldplate cooling system. In order to do so, I vary the air input velocity and temperature as well as the glycol input velocity and temperature for the coldplate using a timestamps and a linear interpolation table between the two. This is no problem, and an example looks like:

Temperature Glycol inlet:
Code:
Glycol_inlet			
{			
type            uniformFixedValue;			
uniformValue    table			
240			
(			
(	0	294.96588	)
(	1.0627	294.981162	)
(	21.0717	294.9973796	)
)			
;
}
Now I need to do something similar for the the heat source. Currently I can do a constant heat source such as

fvOptions
Code:
options
{
    energySource
    {
        type            scalarSemiImplicitSource;
        active       yes;
        selectionMode   cellZone;
	cellZone        Heater;
        volumeMode      specific;

        injectionRateSuSp
        {
            h          (8500 0); // W/m^3 == kg/m/s^3
        }
    }
}
Which works fine, however I do have a variable heat input, and want to use the table format as I do for boundary conditions. I thought perhaps something along the lines of


Code:
options
{
    energySource
    {
        type            scalarSemiImplicitSource;
        active       yes;
        selectionMode   cellZone;
	cellZone        Heater;
        volumeMode      specific;
        injectionRateSuSp
       {			
           h			
              {			
                  Su table			
                      (						
                      (	   0	0	)
                      (	1.0627	804.691468	)
                      (	21.0717	8704.835964	)
                      );	
                     Sp	0.0;
              }	
       }
   }
}
Would work, unfortunately it does not, and it outputs

Quote:
Attempt to return dictionary entry as a primitive

file: /data/Battery/heatTransfer/chtMultiRegionFoam/BatteryClip/Cold_Plate_Cycle_Test/constant/Heater/fvOptions.options.energySource.injectionRateSuSp.h from line 33 to line 38.
As an error. If anyone knows how to work a problem like this I would greatly appreciate any help. If need be I can probably move to OF 7 or OF 8 as well if the functionality is supported there and not in OF 6.

- Cana
cana is offline   Reply With Quote

Old   November 12, 2021, 12:53
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,074
Rep Power: 26
Yann will become famous soon enough
Hi Cana,


It is not possible to use a table with scalarSemiImplicitSource in OpenFOAM 6 nor 7.



You will have to use OpenFOAM-8 or newer: https://github.com/OpenFOAM/OpenFOAM...plicitSource.H


Cheers,
Yann
Yann 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 01:52.