Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
imronuke committed Jul 13, 2020
0 parents commit 22dd251
Show file tree
Hide file tree
Showing 117 changed files with 34,640 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Thanks to https://github.com/codecov. Got this script from there.
language: c
sudo: required

before_install:
- sudo apt-get install gfortran
- pip install --user cpp-coveralls

script:
- cd src
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_data.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_io.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_xsec.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_nodal.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_cmfd.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_th.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_trans.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c mod_control.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage -c ADPRES.f90
- gfortran -O4 -fprofile-arcs -ftest-coverage *.o -o adpres
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/IAEA3Ds
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/FDM
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/PNM
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/DVP
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/CBCsearch
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/adjoint
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/fixed_source
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/MOX/part3_helios
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/static/NEACRP/A1
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/transient/LMW
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/transient/MOX/part4_helios
- ./adpres /home/travis/build/imronuke/ADPRES/smpl/transient/NEACRP/A1t

after_success:
- coveralls --exclude lib --exclude tests --gcov-options '\-lp'
- bash <(curl -s https://codecov.io/bash)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 imronuke

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
![Language](https://raw.githubusercontent.com/imronuke/ADPRES/master/docs/images/fortran.png) [![Build Status](https://travis-ci.com/imronuke/ADPRES.svg?branch=master)](https://travis-ci.com/imronuke/ADPRES) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/imronuke/ADPRES/blob/master/LICENSE) [![codecov](https://codecov.io/gh/imronuke/ADPRES/branch/master/graph/badge.svg)](https://codecov.io/gh/imronuke/ADPRES)





[![ADPRES](https://raw.githubusercontent.com/imronuke/ADPRES/master/docs/images/adpres1.png)](https://imronuke.github.io/ADPRES/)

**Documentation available at**: https://imronuke.github.io/ADPRES/

**Features:**
* Input is straightforward, modular and in a free-format form
* Solves both static and transient core problems **with or without TH feedback**
* Performs forward, adjoint and fixed-source calculations
* Performs calculations using branched cross sections data. An example of the library format can be seen [here](https://github.com/imronuke/ADPRES/blob/master/smpl/xsec/SERPENT_CMM/m40.tab)
* Critical boron concentration search
* Rod ejection simulation or Reactivity Initiated Accident (RIA)
* Solves multi-group of neutron energy
* Solves calculations with Assembly Discontinuity Factors (ADFs)
* CMFD accelerated using two-node problem non-linear iteration
* CMFD matrix is solved with the latest linear system solver: BiCGSTAB
* Thermal-hydraulics solutions are obtained by solving mass and energy conservation equations in an enclosed channel
* Three nodal kernels are available:
* Traditional Finite Difference Method
* Polynomial Nodal Method (PNM) which is equivalent to Nodal Expansion Method (NEM)
* Semi-Analytic Nodal Method (SANM)

# ADPRES

Abu Dhabi Polytechnic Reactor Simulator (ADPRES) is an open nuclear reactor simulator and reactor core analysis tool that solves static and transient neutron diffusion equation for one, two or three dimensional reactor problems in Cartesian geometry. Currently, ADPRES uses Semi-Analytic Nodal Method (SANM) to spatially discretise the neutron diffusion equation. While theta method is used for the time discretisation.

ADPRES is also a great learning tool for reactor theory classes, and we have been striving hard to make the input is easy to create. Among ADPRES' main objectives is to make all nuclear engineering students have access on reactor simulator code for them to use, learn, and modify for their own purposes. It is open and completely free, so everyone has access to the source codes and and play with them.

# User Guides

Here you can find quick and complete guides on how to use ADPRES. Given you have background on nuclear engineering, **we believe you can create your own ADPRES input within minutes!**
## [Theory and Background](https://imronuke.github.io/ADPRES/method)
## [Installation (Building from Source Codes)](https://imronuke.github.io/ADPRES/install)
## [Quick guides](https://imronuke.github.io/ADPRES/quick-guides)
## [Complete guides](https://imronuke.github.io/ADPRES/card-desc)


# How to give feedbacks
You may raise an issue or contact me at
* muhammad.imron[at]adpoly.ac.ae
* makrus.imron[at]gmail.com

# How to cite
If you find this work helpful and use this work for a publication, you may cite as

**Imron, M. (2019). [Development and verification of open reactor simulator ADPRES](https://doi.org/10.1016/j.anucene.2019.06.049). Annals of Nuclear Energy, 133, 580–588.**


> **"The best of people are those who bring most benefit to the rest of mankind." (THE PROPHET)**
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
theme: jekyll-theme-minimal
logo: https://raw.githubusercontent.com/imronuke/ADPRES/master/docs/images/adpres1.png)](https://imronuke.github.io/ADPRES/
google_analytics: UA-163207535-1
3 changes: 3 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
theme: jekyll-theme-cayman
logo: https://raw.githubusercontent.com/imronuke/ADPRES/master/docs/images/adpres1.png
google_analytics: UA-163207535-1
126 changes: 126 additions & 0 deletions docs/adf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
---
title: %ADF
theme: _config.yml
filename: adf
---

# %ADF Card

ADF card can be incorporated into ADPRES input, if any, to make the solution more accurate.

| %ADF | Variable | Description | Remarks or examples |
| --- | --- | --- | --- |
| LINE 1 | DC(1) | East side discontinuity factor | Repeat LINE 2 NG times. And again repeat this input segment NMAT times.(See example below) |
| | DC(2) | West side discontinuity factor |
| | DC(3) | North side discontinuity factor |
| | DC(4) | South side discontinuity factor |
| | DC(5) | Bottom side discontinuity factor |
| | DC(6) | Top side discontinuity factor |
| LINE 2 | ROT | Direction for ADF rotation | This line is optional. Necessary if the value of discontinuity factor is not fully symmetric. Repeat this line followed by LINE 3 as many as desired until zero number (LINE 5) is entered.<br>1 = 90 degree counter clockwise<br>2 = 180 degree counter clock wise<br>3 = 270 degree counter clockwise |
| LINE 3 | X1 | Start assembly position in X-direction | This line follows LINE 2 which tells the position of assembly being rotated. Repeat this line as many as desired until zero numbers (LINE 4). Followings are value limits for these line<br>1 \&lt;= X1 \&lt;= NX;<br>1 \&lt;= X2 \&lt;= NX;<br>1 \&lt;= Y1 \&lt;= NY;<br>1 \&lt;= Y2 \&lt;= NY;<br>1 \&lt;= Z1 \&lt;= NZ;<br>1 \&lt;= Z2 \&lt;= NZ;<br>X1 \&lt;= X2; Y1 \&lt;= Y2; Z1 \&lt;= Z2 |
| | X2 | End assembly position in X-direction |
| | Y1 | Start assembly position in Y-direction |
| | Y2 | End assembly position in Y-direction |
| | Z1 | Start assembly position in Z-direction |
| | Z2 | End assembly position in Z-direction |
| LINE 4 | 0 | Zero numbers entered to end X1 through Z2 | |
| | 0 |
| | 0 |
| | 0 |
| | 0 |
| | 0 |
| LINE 5 | 0 | Zero number to end ROT |
| LINE 6 | ZP | ADF print option | This line is optional. |

Example:
```
! Assembly Discontinuity Factors Card
%ADF
!g1 -> east west north south
!g2 -> east west north south
! COMPOSITION 1
0.9966 0.9288 0.9966 0.9288 1.0000 1.0000 ! LINE 1
1.1332 1.6570 1.1332 1.6570 1.0000 1.0000 ! LINE 1
! COMPOSITION 2
1.0787 0.8423 1.0787 0.8423 1.0000 1.0000 ! LINE 1
1.6423 0.6809 1.6423 0.6809 1.0000 1.0000 ! LINE 1
! COMPOSITION 3
0.9989 0.9114 0.9989 0.9114 1.0000 1.0000 ! LINE 1
1.1664 1.5805 1.1664 1.5805 1.0000 1.0000 ! LINE 1
! COMPOSITION 4
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 ! LINE 1
1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 ! LINE 1
! ADF ROTATION DUE TO DIAGONALLY SYMMETRIC ADFs
1 ! 90 degree counter clock-wise ! LINE 2
2 2 1 1 1 2 ! LINE 3 (and next rows)
2 2 3 3 1 2
2 2 5 5 1 2
2 2 7 7 1 2
2 2 9 9 1 2
2 2 11 11 1 2
4 4 1 1 1 2
4 4 3 3 1 2
4 4 5 5 1 2
4 4 7 7 1 2
4 4 9 9 1 2
6 6 1 1 1 2
6 6 3 3 1 2
6 6 5 5 1 2
6 6 7 7 1 2
6 6 9 9 1 2
8 8 1 1 1 2
8 8 3 3 1 2
8 8 5 5 1 2
8 8 7 7 1 2
10 10 1 1 1 2
10 10 3 3 1 2
0 0 0 0 0 0 ! LINE 4
2 ! 180 degree counter clock-wise
2 2 2 2 1 2 ! LINE 3 (and next rows)
2 2 4 4 1 2
2 2 6 6 1 2
2 2 8 8 1 2
2 2 10 10 1 2
4 4 2 2 1 2
4 4 4 4 1 2
4 4 6 6 1 2
4 4 8 8 1 2
4 4 10 10 1 2
6 6 2 2 1 2
6 6 4 4 1 2
6 6 6 6 1 2
6 6 8 8 1 2
8 8 2 2 1 2
8 8 4 4 1 2
8 8 6 6 1 2
8 8 8 8 1 2
10 10 2 2 1 2
10 10 4 4 1 2
0 0 0 0 0 0 ! LINE 4
3 ! 270 degree counter clock-wise
1 1 2 2 1 2 ! LINE 3 (and next rows)
1 1 4 4 1 2
1 1 6 6 1 2
1 1 8 8 1 2
1 1 10 10 1 2
3 3 2 2 1 2
3 3 4 4 1 2
3 3 6 6 1 2
3 3 8 8 1 2
3 3 10 10 1 2
5 5 2 2 1 2
5 5 4 4 1 2
5 5 6 6 1 2
5 5 8 8 1 2
7 7 2 2 1 2
7 7 4 4 1 2
7 7 6 6 1 2
7 7 8 8 1 2
9 9 2 2 1 2
9 9 4 4 1 2
9 9 6 6 1 2
11 11 2 2 1 2
0 0 0 0 0 0 ! LINE 4
0 ! ADF INPUTS END ! LINE 5
1 ! Print option ! LINE 6
```
52 changes: 52 additions & 0 deletions docs/bcon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: %BCON
theme: _config.yml
filename: bcon
---

# %BCON Card

This card is used to input boron concentration parameters. `%BCON` and `%CBCS` shall not present together.

| `%BCON` | Variable | Description | Remarks |
| --- | --- | --- | --- |
| LINE 1 | BCON | Core boron concentration in ppm | Used as guess if `%THER` card active |
| LINE 2 | RBCON | Reference boron concentration in ppm from which the interpolation is done | Dummy if `%XTAB` card present |
| LINE 3 | CISGTR(g) | Macroscopic Cross Section changes due to changes of boron concentration in ppm | Repeat LINE 2 NG times. And again repeat this input segment NMAT times. **This line is not necessary if `%XTAB` card present** |
| | CSIGA(g) |
| | CNUF(g) |
| | CSIGF(g) |
| | CSIGS(g,1:NG) |
| LINE 4 | POPT | Print option if users want to print this card | Optional |

Example:
```
! BORON CONCENTRATION
%BCON
560.53 1200.2 ! Boron concentration ref. in ppm
! CX change per unit ppm change of Boron concentration
! sigtr siga nu*sigf kappa*sigf sigs_g1 sigs_g2
6.11833E-08 1.87731E-07 0.00000E+00 0.00000E+00 0.0 7.91457E-10
5.17535E-06 1.02635E-05 0.00000E+00 0.00000E+00 0.0 0.00000E+00 !COMP 1
0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.0 0.00000E+00
7.76184E-04 8.44695E-05 0.00000E+00 0.00000E+00 0.0 0.00000E+00 !COMP 2
0.00000E+00 0.00000E+00 0.00000E+00 0.00000E+00 0.0 0.00000E+00
7.76184E-04 8.44695E-05 0.00000E+00 0.00000E+00 0.0 0.00000E+00 !COMP 3
3.47809E-08 1.28505E-07 -1.12099E-09 -1.76188E-20 0.0 -1.08590E-07
-9.76510E-06 7.08807E-06 -2.43045E-06 -3.19085E-17 0.0 0.00000E+00 !COMP 4
3.53826E-08 1.26709E-07 -1.67880E-09 -2.49965E-20 0.0 -1.06951E-07
-8.50169E-06 6.82311E-06 -2.72445E-06 -3.57680E-17 0.0 0.00000E+00 !COMP 5
3.59838E-08 1.24986E-07 -2.21038E-09 -3.20225E-20 0.0 -1.05374E-07
-7.46251E-06 6.59798E-06 -2.95883E-06 -3.88451E-17 0.0 0.00000E+00 !COMP 6
3.37806E-08 1.19869E-07 -1.71323E-09 -2.49965E-20 0.0 -1.00873E-07
-6.73744E-06 6.29310E-06 -2.55359E-06 -3.35223E-17 0.0 0.00000E+00 !COMP 7
3.32495E-08 1.17585E-07 -1.72421E-09 -2.54896E-20 0.0 -9.88578E-08
-6.19725E-06 6.11904E-06 -2.48880E-06 -3.26704E-17 0.0 0.00000E+00 !COMP 8
3.27201E-08 1.15319E-07 -1.73502E-09 -2.56049E-20 0.0 -9.68489E-08
-5.68220E-06 5.94711E-06 -2.42240E-06 -3.17976E-17 0.0 0.00000E+00 !COMP 9
3.43859E-08 1.18186E-07 -2.24335E-09 -3.20225E-20 0.0 -9.93312E-08
-5.86898E-06 6.08443E-06 -2.77657E-06 -3.64509E-17 0.0 0.00000E+00 !COMP 10
3.38559E-08 1.15917E-07 -2.25369E-09 -3.24873E-20 0.0 -9.73291E-08
-5.38345E-06 5.91697E-06 -2.70780E-06 -3.55476E-17 0.0 0.00000E+00 !COMP 11
1
```
64 changes: 64 additions & 0 deletions docs/card-desc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Card Description
theme: _config.yml
filename: card-desc
---

# General Rules

Some general rules for ADPRES inputs:
1. Input deck is in free-format form with maximum 200 columns
2. Comments are marked by `!`. Example:
```
! COMPOSITION 1
0.20574 0.00654 0.00415 0.00415 1.0 0.0 0.01462 !Group 1
0.68866 0.04850 0.06099 0.06099 0.0 0.0 0.00000 !Group 2
```

3. ADPRES input is modular, where it is broken into several cards. Cards’ keywords shall be uppercase and marked by `%`. Example:
```
%MODE
FORWARD
%XSEC ! Cross section card
2 4 ! Number of groups and number of materials
...
...
%GEOM ! Geometry card
12 12 2 !nx, ny, nz
...
...
```

4. Numbers can be repeated using `*` mark. For example
```
10.0 8*20.0 !is equivalent to 10.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0 20.0
```


# Card Description

ADPRES has several input cards. Card is a keyword marked with `%`. Each card can be placed arbitrarily in the input deck. Two cards are mandatory for any problems, while the rest are optional and conditional depend on the nature problem being solved. The description of input for each card is explained in this subsection. Following table lists all cards used in ADPRES. You can click each cards to get their description


| **No.** | **Cards** | **Description** | **Remark** |
| --- | --- | --- | --- |
| 1. | [`%MODE`](https://imronuke.github.io/ADPRES/mode) | Calculation mode | Mandatory |
| 2. | [`%GEOM`](https://imronuke.github.io/ADPRES/geom) | Geometry of the problem | Mandatory |
| 3. | [`%XSEC`](https://imronuke.github.io/ADPRES/xsec) | Cross Sections | Conditional |
| 4. | [`%CASE`](https://imronuke.github.io/ADPRES/case) | Problem case | Optional |
| 5. | [`%ESRC`](https://imronuke.github.io/ADPRES/esrc) | Extra source | Conditional |
| 7. | [`%ITER`](https://imronuke.github.io/ADPRES/iter) | Iteration Control | Optional |
| 8. | [`%PRNT`](https://imronuke.github.io/ADPRES/prnt) | Output print control | Optional |
| 9. | [`%ADF`](https://imronuke.github.io/ADPRES/adf) | Assembly Discontinuity Factor | Optional |
| 10. | [`%CROD`](https://imronuke.github.io/ADPRES/crod) | Control rods | Conditional |
| 11. | [`%EJCT`](https://imronuke.github.io/ADPRES/ejct) | Control rods ejection and/or insertion | Conditional |
| 12. | [`%FTEM`](https://imronuke.github.io/ADPRES/ftem) | Fuel temperature input card | Conditional |
| 13. | [`%MTEM`](https://imronuke.github.io/ADPRES/mtem) | Moderator/Coolant temperature input card | Conditional |
| 14. | [`%CDEN`](https://imronuke.github.io/ADPRES/cden) | Coolant density input card | Conditional |
| 15. | [`%BCON`](https://imronuke.github.io/ADPRES/bcon) | Boron concentration input card | Conditional |
| 16. | [`%CBCS`](https://imronuke.github.io/ADPRES/cbcs) | Critical boron concentration input card | Conditional |
| 17. | [`%THER`](https://imronuke.github.io/ADPRES/ther) | TH input card | Conditional |
| 18. | [`%XTAB`](https://imronuke.github.io/ADPRES/xtab) | XSEC library for branch calculations | Conditional |
| 19. | [`%KERN`](https://imronuke.github.io/ADPRES/kern) | Nodal kernel options | Optional |
| 20. | [`%EXTR`](https://imronuke.github.io/ADPRES/extr) | Exponential flux transformation option card for transient problem | Optional |
| 21. | [`%THET`](https://imronuke.github.io/ADPRES/thet) | Used to set theta value for transient problem | Optional |
22 changes: 22 additions & 0 deletions docs/case.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: %CASE
theme: _config.yml
filename: case
---

# %CASE Card

This card describes the problem case and case description if necessary.

| %CASE | Variable | Description | Examples |
| --- | --- | --- | --- |
| LINE 1 | CASE_ID | Case name | Example: `DVP` |
| LINE 2 | CASE_EXP | Case Description | Example: `DVP Problem Test` |

Example:
```
! CASE CARD
%CASE
MOX_HEL
MOX TRANSIENT PROBLEM WITH XSEC FROM HELIOS
```
Loading

0 comments on commit 22dd251

Please sign in to comment.