-- 3D Transport test with
Vacuum and Incident-isotropic BC.
-- SDM: PWLD
-- Test: Max-value=5.28310e-01 and 8.04576e-04
num_procs = 4
if (reflecting == nil) then reflecting = true end
--############################################### Check num_procs
if (check_num_procs==nil and chi_number_of_processes ~= num_procs) then
chiLog(LOG_0ERROR,
"Incorrect amount of processors. " ..
"Expected "..tostring(num_procs)..
". Pass check_num_procs=false to override if possible.")
os.exit(false)
end
--############################################### Setup mesh
nodes={}
N=10
L=5
xmin = -L/2
dx = L/N
for i=1,(N+1) do
k=i-1
nodes[i] = xmin + k*dx
end
znodes={}
for i=1,(N/2+1) do
k=i-1
znodes[i] = xmin + k*dx
end
if (reflecting) then
else
end
--###############################################
Set Material IDs
--############################################### Add materials
materials = {}
num_groups = 21
CHI_XSFILE,"../Transport_Steady/xs_graphite_pure.cxs")
src={}
for g=1,num_groups do
src[g] = 0.0
end
src[1] = 1.0
--############################################### Setup Physics
lbs_block =
{
num_groups = num_groups,
groupsets =
{
{
groups_from_to = {0, 20},
angular_quadrature_handle = pquad0,
angle_aggregation_type = "single",
angle_aggregation_num_subsets = 1,
groupset_num_subsets = 1,
inner_linear_method = "gmres",
l_abs_tol = 1.0e-6,
l_max_its = 300,
gmres_restart_interval = 100,
},
}
}
lbs_options =
{
scattering_order = 1,
}
if (reflecting) then
lbs_options.boundary_conditions = {{name = "zmax", type = "reflecting"}}
end
lbs.SetOptions(phys1, lbs_options)
--############################################### Initialize and Execute Solver
--############################################### Get field functions
--############################################### Slice plot
--slices = {}
--for k=1,count do
--end
--############################################### Volume integrations
curffi = ffi1
chiLog(LOG_0,
string.format(
"Max-value1=%.5e", maxval))
curffi = ffi1
chiLog(LOG_0,
string.format(
"Max-value2=%.5e", maxval))
--############################################### Exports
if (master_export == nil) then
if (reflecting) then
else
end
end
--############################################### Plots
if (chi_location_id == 0 and master_export == nil) then
--os.execute("python ZPFFI00.py")
----os.execute("python ZPFFI11.py")
--local handle = io.popen("python ZPFFI00.py")
print("Execution completed")
end
-- DO
--[0] Max-value1=2.52092e+00
--[0] Max-value2=5.79100e-03
-- MGDiffusion
--[0] Max-value1=2.74873e-01
--[0] Max-value2=9.47508e-05
Pair chiLBSGetScalarFieldFunctionList(int SolverIndex)
void chiFFInterpolationExportPython(int FFIHandle, char BaseName)
Handle chiFFInterpolationCreate(int FFITypeIndex)
void chiFFInterpolationExecute(int FFIHandle)
void chiFFInterpolationGetValue(int FFIHandle)
void chiFFInterpolationInitialize(int FFIHandle)
Handle chiFFInterpolationSetProperty(int FFIHandle, int PropertyIndex)
void chiLog(int LogType, char LogMsg)
MaterialHandle chiPhysicsAddMaterial(char Name)
void chiPhysicsMaterialAddProperty(int MaterialHandle, int PropertyIndex)
void chiPhysicsMaterialSetProperty(int MaterialHandle, int PropertyIndex, int OperationIndex, varying Information)
Returns chiCreateProductQuadrature(int QuadratureType, varying values)
void chiVolumeMesherSetMatIDToAll(int material_id)
void chiSolverExecute(int solver_handle)
void chiSolverInitialize(int solver_handle)
void chiExportMultiFieldFunctionToVTK(table listFFHandles, char BaseName)
void Set(VecDbl &x, const double &val)