This code is the worst code you may have seen, I did it in 2016-2017. I am currently refactoring it.
Fermi is a parallel Finite Element (FE) code to model the neutron diffusion in nuclear reactors. The code was design to solve the steady-state, and also, the time-dependent multi-group equations. Fermi uses PETSc library to assemble and solve the system of equations in distributed architectures.
Some additional features are expected to be implemented:
- Control rod simulation.
- Xenon evolution and poisoning.
Build the docker image:
docker build -t fermi .
Run the container and connect with the local volume. This is useful for local development:
docker run -v $PWD:/fermi -it --rm fermi /bin/bash
In the docker bash session execute:
mkdir build
cd build
cmake ..
make
Run tests with:
ctest
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=1
$Mesh
mesh_file fuel_1.msh
$EndMesh
$Mode
timedep QSTATIC
p0 2.5e6
t0 0.0
tf 0.15
dt 0.05
$EndMode
$Xs
egn 1
# F D XA nXF eXF CHI
"FUEL_Z1" 0 1.5 0.2 0.5 0.4 1.0
"FLUID_Z1" 0 1.5 0.005 0.0 0.0 1.0
$EndXs
$Boundary
"TOP_SURF" 1 0
"BOT_SURF" 2 0
"LAT_SURF" 3 1
$EndBoundary
$Output
# Power in physical entities
kind 2
file pow_phys.dat
nphy 2
"FUEL_Z1" "FLUID_Z1"
$EndOutput
Login, tag and push to ghcr:
echo $GITHUB_PAT | docker login ghcr.io -u USERNAME --password-stdin
docker tag IMAGE_ID ghcr.io/USERNAME/IMAGE_NAME:TAG
docker push ghcr.io/USERNAME/IMAGE_NAME:TAG
- Testing
- Parallelization and performance evaluation
- Benchmarking
- Documentation
Guido Giuntoli - [gagiuntoli@gmail.com]