Chi-Tech
doc_Bc_field_functions.h
Go to the documentation of this file.
1
/** \page LBSFieldFunctions Field Functions
2
3
LBS solvers create a number of field functions. Here is the logic for it:
4
- Field functions are by default named `phi_gXXX_mYYY` where
5
`XXX` is a zero padded 3 digit number for the group
6
number. `YYY` is a zero padded 3 digit number for the moment number. Numbers
7
spanning beyond the 3 digits will have no zero padding and will be
8
represented normally (the 3 digit padding just helps in visualization cases).
9
Example:
10
Suppose this is a 3D simulation, 2 groups, scattering order of 1
11
(resulting in 4 moments)
12
\code
13
phys1 = chiLBSCreateSolver()
14
chiSolverAddRegion(phys1,region1)
15
--
16
-- Add Groupset construction here
17
--
18
chiLBSSetProperty(phys1,DISCRETIZATION_METHOD,PWLD)
19
chiLBSSetProperty(phys1,SCATTERING_ORDER,1)
20
--
21
chiLBSInitialize(phys1)
22
chiLBSExecute(phys1)
23
--
24
fflist,count = chiLBSGetScalarFieldFunctionList(phys1)
25
\endcode
26
27
will create field functions
28
\code
29
phi_g000_m000
30
phi_g000_m001
31
phi_g000_m002
32
phi_g000_m003
33
phi_g001_m000
34
phi_g001_m001
35
phi_g001_m002
36
phi_g001_m003
37
\endcode
38
39
We can get the scalar field functions with a call to
40
`chiLBSGetScalarFieldFunctionList` which will return a table with the field
41
function handles of only the scalar fields. E.g.,
42
\code
43
fflist = chiLBSGetScalarFieldFunctionList(phys1)
44
\endcode
45
with `fflist` containing handles to
46
\code
47
phi_g000_m000
48
phi_g001_m000
49
\endcode
50
51
Additionally, LBS can create a power generation field function with the
52
default name `power_generation`.
53
\code
54
chiLBSSetOptions(phys1,
55
{
56
spatial_discretization = "pwld",
57
scattering_order = 2,
58
power_field_function_on = true,
59
power_default_kappa = 1.0,
60
power_normalization = -1.0, --Negative means its disabled
61
})
62
\endcode
63
64
All of the field function can be supplied with a prefix, either using the
65
solver name
66
\code
67
chiLBSSetOptions(phys1,
68
{
69
spatial_discretization = "pwld",
70
scattering_order = 2,
71
power_field_function_on = true,
72
power_default_kappa = 1.0,
73
power_normalization = -1.0, --Negative means its disabled
74
75
field_function_prefix_option = "solver_name"
76
})
77
\endcode
78
79
or by setting a different prefix
80
\code
81
chiLBSSetOptions(phys1,
82
{
83
spatial_discretization = "pwld",
84
scattering_order = 2,
85
power_field_function_on = true,
86
power_default_kappa = 1.0,
87
power_normalization = -1.0, --Negative means its disabled
88
89
field_function_prefix = "prefixx"
90
})
91
\endcode
92
93
\ingroup LBSUtilities*/
modules
LinearBoltzmannSolvers
doc
doc_Bc_field_functions.h
Generated by
1.9.3