Chi-Tech
doc_Bc_field_functions.h
Go to the documentation of this file.
1/** \page LBSFieldFunctions Field Functions
2
3LBS 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).
9Example:
10Suppose this is a 3D simulation, 2 groups, scattering order of 1
11(resulting in 4 moments)
12\code
13phys1 = chiLBSCreateSolver()
14chiSolverAddRegion(phys1,region1)
15--
16-- Add Groupset construction here
17--
18chiLBSSetProperty(phys1,DISCRETIZATION_METHOD,PWLD)
19chiLBSSetProperty(phys1,SCATTERING_ORDER,1)
20--
21chiLBSInitialize(phys1)
22chiLBSExecute(phys1)
23--
24fflist,count = chiLBSGetScalarFieldFunctionList(phys1)
25\endcode
26
27will create field functions
28\code
29phi_g000_m000
30phi_g000_m001
31phi_g000_m002
32phi_g000_m003
33phi_g001_m000
34phi_g001_m001
35phi_g001_m002
36phi_g001_m003
37\endcode
38
39We can get the scalar field functions with a call to
40`chiLBSGetScalarFieldFunctionList` which will return a table with the field
41function handles of only the scalar fields. E.g.,
42\code
43fflist = chiLBSGetScalarFieldFunctionList(phys1)
44\endcode
45with `fflist` containing handles to
46\code
47phi_g000_m000
48phi_g001_m000
49\endcode
50
51Additionally, LBS can create a power generation field function with the
52default name `power_generation`.
53\code
54chiLBSSetOptions(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
64All of the field function can be supplied with a prefix, either using the
65solver name
66\code
67chiLBSSetOptions(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
79or by setting a different prefix
80\code
81chiLBSSetOptions(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*/