-- 1D Transient Transport test with
Vacuum BC.
-- SDM: PWLD
-- Test:
num_procs = 2
--############################################### 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=20
L=100.0
xmin = 0.0
dx = L/N
for i=1,(N+1) do
k=i-1
nodes[i] = xmin + k*dx
end
--###############################################
Set Material IDs
--############################################### Add materials
materials = {}
-- Define microscopic cross sections
xs_file = "tests/Transport_Transient/subcritical_1g.cxs"
-- Define macroscopic cross sections
num_groups = 1
EXISTING,xs)
EXISTING,xs)
src={}
for g=1,num_groups do
src[g] = 0.0
end
--src[1] = 1.0
--############################################### Setup Physics
--========== Groups
grp = {}
for g=1,num_groups do
end
--========== ProdQuad
--========== Groupset def
cur_gs = gs0
--
----############################################### Set boundary conditions
--bsrc={}
--for g=1,num_groups do
-- bsrc[g] = 0.0
--end
--bsrc[1] = 1.0/2
--
chiLBKESSetProperty(phys1, "MAX_ITERATIONS", 100)
chiLBKESSetProperty(phys1, "TOLERANCE", 1.0e-8)
--############################################### Initialize and Execute Solver
--for k=1,2 do
-- period = dt/math.log(FRf/FRi)
--
chiLog(LOG_0,
string.format("%s time=%10.3g dt=%10.3g period=%10.3g", phys1name,t,dt,period))
--end
time = 0.0
time_stop = 20.0
k=0
while (time < time_stop) do
k = k + 1
period = dt/math.log(FRf/FRi)
chiLog(LOG_0,
string.format("%s %4d time=%10.3g dt=%10.4g period=%10.3g FR=%10.3e",
phys1name,k,time,dt,period,FRf))
end
void chiLBSSetProperty(int SolverIndex, int PropertyIndex)
double chiLBSComputeFissionRate(int SolverIndex, string OldNewOption)
void chiLBSGroupsetAddGroups(int SolverIndex, int GroupsetIndex, int FromIndex, int ToIndex)
void chiLBSGroupsetSetQuadrature(int SolverIndex, int GroupsetIndex, int QuadratureIndex)
void chiLBSGroupsetSetTGDSA(int SolverIndex, int GroupsetIndex, int MaxIters, float ResTol, bool Verbose, char PETSCString)
void chiLBSCreateGroup(int SolverIndex, int GroupId)
void chiLBSGroupsetSetMaxIterations(int SolverIndex, int GroupsetIndex, int Numiter)
void chiLBSGroupsetSetAngleAggDiv(int SolverIndex, int GroupsetIndex, int NumDiv)
void chiLBSGroupsetSetGroupSubsets(int SolverIndex, int GroupsetIndex, int NumDiv)
void chiLBSGroupsetSetResidualTolerance(int SolverIndex, int GroupsetIndex, float ResidualTol)
void chiLBSGroupsetSetWGDSA(int SolverIndex, int GroupsetIndex, int MaxIters, float ResTol, bool Verbose, char PETSCString)
void chiLBSGroupsetSetIterativeMethod(int SolverIndex, int GroupsetIndex, int IterativeMethod)
void chiLBSCreateGroupset(int SolverIndex)
void chiLBSGroupsetSetGMRESRestartIntvl(int SolverIndex, int GroupsetIndex, int Intvl)
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 chiPhysicsTransportXSSet(int XS_handle, int OperationIndex, varying Information)
Returns chiPhysicsTransportXSCreate()
Returns chiPhysicsTransportXSMakeCombined(table Combinations)
void chiVolumeMesherSetMatIDToAll(int material_id)
void chiSolverStep(int solver_handle)
void chiSolverGetName(int solver_handle)
void chiSolverInitialize(int solver_handle)
void chiLBTSGetProperty(int SolverIndex, string PropertyName)
void chiLBSCreateTransientSolver(string SolverName)
void chiLBTSSetProperty(int SolverIndex, string PropertyName)
void Set(VecDbl &x, const double &val)