Chi-Tech
Transport Cross Sections

Functions

Returns chi_lua::chiPhysicsTransportXSCreate ()
 
void chi_lua::chiPhysicsTransportXSSet (int XS_handle, int OperationIndex, varying Information)
 
void chi_lua::chiPhysicsTransportXSGet (int XS_handle)
 
Returns chi_lua::chiPhysicsTransportXSMakeCombined (table Combinations)
 
void chi_lua::chiPhysicsTransportXSSetCombined (int XS_handle, table Combinations)
 
void chi_lua::chiPhysicsTransportXSExportToChiTechFormat (int XS_handle, string file_name)
 

Detailed Description

Function Documentation

◆ chiPhysicsTransportXSCreate()

Returns chi_lua::chiPhysicsTransportXSCreate ( )

◆ chiPhysicsTransportXSExportToChiTechFormat()

void chi_lua::chiPhysicsTransportXSExportToChiTechFormat ( int  XS_handle,
string  file_name 
)

Exports a cross section to ChiTech format.

Parameters
XS_handleint Handle to the cross section to be exported.
file_namestring The name of the file to which the XS is to be exported.

Definition at line 954 of file lua_functions.c.

◆ chiPhysicsTransportXSGet()

void chi_lua::chiPhysicsTransportXSGet ( int  XS_handle)

Obtains a lua table of all the cross section values.

Parameters
XS_handleint Handle to the cross section to be modified.

_

To print the contents of the table, execute the following:

xs = chiPhysicsTransportXSGet(xs_handle)
for i,v in pairs(xs) do
print(i,v)
end
void chiPhysicsTransportXSGet(int XS_handle)

Usage Examples:

test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/utils/QBlock_materials.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/utils/QBlock_materials.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/c5g7/materials/materials.lua

Definition at line 874 of file lua_functions.c.

◆ chiPhysicsTransportXSMakeCombined()

Returns chi_lua::chiPhysicsTransportXSMakeCombined ( table  Combinations)

Makes a combined cross section from multiple other cross sections.

Parameters
Combinationstable A lua-table with each element another table containing a handle to an existing xs and a scalar multiplier.

_

Example:

Example lua code:

chiPhysicsTransportXSSet(xs_1,CHI_XSFILE,"test/xs_graphite_pure.cxs")
chiPhysicsTransportXSSet(xs_2,CHI_XSFILE,"test/xs_3_170.cxs")
chiPhysicsTransportXSSet(xs_3,CHI_XSFILE,"test/xs_air50RH.cxs")
combo ={{xs_1, 0.5e5},
{xs_2, 0.4e3},
{xs_3, 0.3e2}}
aerated_graphite = chiPhysicsTransportXSMakeCombined(combo)
TRANSPORT_XSECTIONS,
EXISTING,
aerated_graphite)
Returns chiPhysicsTransportXSMakeCombined(table Combinations)
Returns
Returns a handle to another cross section object that contains the desired combination.

Usage Examples:

test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_1.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_3.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_3.lua

Definition at line 914 of file lua_functions.c.

◆ chiPhysicsTransportXSSet()

void chi_lua::chiPhysicsTransportXSSet ( int  XS_handle,
int  OperationIndex,
varying  Information 
)

Sets the properties of a transport cross section.

Parameters
XS_handleint Handle to the cross section to be modified.
OperationIndexint Method used for setting the xs property.
Informationvarying Varying information depending on the operation.

_

OperationIndex

SINGLE_VALUE
Sets the property based on a single value. Requires a single value as additional information. As a simple example consider the case where the user would like to set a single constant thermal conductivity. This can be achieved with
FROM_ARRAY
Sets a property based on a Lua array indexed from 1 to N. Internally will be converted to 0 to N-1. This method can be used to set mutli-group cross sections or sources.
SIMPLEXS0
Makes a simple material with no transfer matrix just $\sigma_t $. Expects two values:

  • int number of groups $G $,
  • float $\sigma_t $.

_

SIMPLEXS1
Makes a simple material with isotropic transfer matrix (L=0) and mostly down scattering but with a few of the last groups subject to up-scattering. Expects three values values:

  • int number of groups ( $G $),
  • float $\sigma_t $,
  • float scattering to total ratio ( $c $)

_

CHI_XSFILE
Loads transport cross sections from CHI type cross section files. Expects to be followed by a filepath specifying the xs-file.

_

Example

Example lua code:

chiPhysicsTransportXSSet(graphite,"xs_3_170.data","2518")

Usage Examples:

test/modules/LinearBoltzmannSolvers/MGDiffusion_KEigen/utils/QBlock_materials.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_1.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_3.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_3.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport2D_2.lua
test/modules/LinearBoltzmannSolvers/Transport_Transient/TransientTransport1D_2.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/utils/QBlock_materials.lua
test/modules/LinearBoltzmannSolvers/Transport_Keigen/c5g7/materials/materials.lua

Definition at line 855 of file lua_functions.c.

◆ chiPhysicsTransportXSSetCombined()

void chi_lua::chiPhysicsTransportXSSetCombined ( int  XS_handle,
table  Combinations 
)

Sets a combined cross section from multiple other cross sections. This function can be called multiple times on the same cross section handle.

Parameters
XS_handleint Handle to the cross section to be modified.
Combinationstable A lua-table with each element another table containing a handle to an existing xs and a scalar multiplier.

_

Example:

Example lua code:

chiPhysicsTransportXSSet(xs_1,CHI_XSFILE,"test/xs_graphite_pure.cxs")
chiPhysicsTransportXSSet(xs_2,CHI_XSFILE,"test/xs_3_170.cxs")
chiPhysicsTransportXSSet(xs_3,CHI_XSFILE,"test/xs_air50RH.cxs")
combo ={{xs_1, 0.5e5},
{xs_2, 0.4e3},
{xs_3, 0.3e2}}
aerated_graphite = chiPhysicsTransportXSMakeCombined(combo)
chiPhysicsTransportXSSetCombined(aerated_graphite,combo)
void chiPhysicsTransportXSSetCombined(int XS_handle, table Combinations)

Definition at line 946 of file lua_functions.c.