fitroom.room module¶
Created on Mon Sep 18 01:58:04 2017
@author: erwan
- class DynVar(slab, param, func=<function DynVar.<lambda>>)[source]¶
Bases:
object
To allow dynamic (runtime) filling of conditions in SlabList
- Parameters
slab (str) – slab config name in Slablist. Note that
'self'
in DynVar can be used to refer to the DynVar’s own slab. Ex:slabPlasma={ 'Trot':2000, 'Tvib':DynVar('self', 'Trot'), }
param (str) – param name in slab config dict
func (function) – function to apply. Default identity
Examples
slbPostCO2 = { 'db':db0, 'Tgas':500, 'db':dbp, 'Tgas':1100, 'path_length':0.7, 'mole_fraction':0.35, } slbPostCO = { 'db':dbco, 'Tgas':slbPostCO2['Tgas'], 'path_length':DynVar('sPostCO2', 'path_length', lambda x:x), # evaluated at runtime using names in Slablist 'mole_fraction':0.01, } Slablist = { 'sPostCO2': slbPostCO2, 'sPostCO': slbPostCO, }
You can also use a function, for instance to maintain the equilibrium concentration in a fit on temperature:
from radis.tools.gascomp import get_eq_mole_fraction get_co2_eq = lambda T: get_eq_mole_fraction('CO2:1', T, 1e5) slbPlasmaCO2 = { 'db':dbp, 'Trot':1500, 'Tvib':DynVar('self', 'Trot'), 'path_length':0.025, 'mole_fraction':DynVar('self', 'Trot', get_co2_eq), }
Here the CO2 Plasma slab is always evaluated with Tvib=Trot and x_co2 at chemical equilibrium with T=Trot.
- class FitRoom(Slablist, slbInteractx, slbInteracty, xparam, yparam, perfmode=False)[source]¶
Bases:
object
- Parameters
perfmode (boolean)
if ``True`` we try to optimize calculation times (ex (minimized windows)
are not recalculated)
Examples
See also
CaseSelector
,Grid3x3
,MultiSlabPlot
,SlabsConfigSolver
,Overpopulator
,SlitTool