summaryrefslogtreecommitdiff
path: root/Dragon/data/pincell_mco_proc/CalcFlux.c2m
diff options
context:
space:
mode:
authorstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
committerstainer_t <thomas.stainer@oecd-nea.org>2025-09-08 13:48:49 +0200
commit7dfcc480ba1e19bd3232349fc733caef94034292 (patch)
tree03ee104eb8846d5cc1a981d267687a729185d3f3 /Dragon/data/pincell_mco_proc/CalcFlux.c2m
Initial commit from Polytechnique Montreal
Diffstat (limited to 'Dragon/data/pincell_mco_proc/CalcFlux.c2m')
-rw-r--r--Dragon/data/pincell_mco_proc/CalcFlux.c2m93
1 files changed, 93 insertions, 0 deletions
diff --git a/Dragon/data/pincell_mco_proc/CalcFlux.c2m b/Dragon/data/pincell_mco_proc/CalcFlux.c2m
new file mode 100644
index 0000000..a26e6ea
--- /dev/null
+++ b/Dragon/data/pincell_mco_proc/CalcFlux.c2m
@@ -0,0 +1,93 @@
+*DECK CalcFlux
+*----
+* Name : CalcFlux.c2m
+* Type : DRAGON procedure
+* Use : Flux calculation
+* Author : A. Hebert
+*
+* Procedure called as:
+*
+* LIBRARY2 FLUX := CalcFlux LIBRARY2 FLUX LIBRARY TRACKN :: (data) ;
+*
+* Input data :
+* LIBRARY : Microlib with subgroups
+* LIBRARY2 : Self-shielded microlib
+* TRACKN : Tracking
+* FLUX : Multigroup flux
+* Output data :
+* LIBRARY2 : Self-shielded microlib
+* FLUX : Multigroup flux
+* Parameters :
+* istep : Burnup step index corresponding to the calculation
+* BUend : Burnup corresponding to the calculation
+* BUnextSS : Burnup corresponding to the next self-shielding
+* calculation
+* Fuelpwr : Fuel power in MW/tonne
+
+PARAMETER LIBRARY2 FLUX LIBRARY TRACKN ::
+ EDIT 1
+ ::: LINKED_LIST LIBRARY2 FLUX LIBRARY TRACKN ;
+ ;
+* ;
+*----
+* Modules used in this procedure
+*----
+MODULE ASM: FLU: EDI: EVO: USS: GREP: ABORT: DELETE: UTL: END: ;
+LINKED_LIST EDITION SYS ;
+REAL B2 Kinf1 Kinf2 Keff2 Tend ;
+
+INTEGER istep ;
+REAL BUend BUnextSS Fuelpwr ;
+ :: >>istep<< >>BUend<< >>BUnextSS<< >>Fuelpwr<< ;
+
+ EVALUATE Tend := BUend Fuelpwr / ;
+ ECHO "-----------------------------------------------------------" ;
+ ECHO "Flux calculation at step=" istep ;
+ ECHO "BURNUP_sortie = " BUend "Next SS = " BUnextSS ;
+ IF BUend BUnextSS - ABS 1E-5 < THEN
+ ECHO "Perform a self-shielding calculation" ;
+ ECHO "-----------------------------------------------------------" ;
+ IF istep 1 = THEN
+ ECHO "first call" ;
+ LIBRARY2 := USS: LIBRARY TRACKN ::
+ EDIT 0
+ ARM
+ TRAN
+ PASS 2
+ GRMIN 45
+ ;
+ ECHO "out" ;
+ ELSE
+ LIBRARY2 := USS: LIBRARY2 LIBRARY TRACKN ;
+ ENDIF ;
+ ELSE
+ ECHO "No self-shielding calculation" ;
+ ECHO "-----------------------------------------------------------" ;
+ ENDIF ;
+************************************************************************
+* BEGIN FLUX CALCULATION *
+************************************************************************
+ SYS := ASM: LIBRARY2 TRACKN ::
+ EDIT 0 ARM ;
+
+ IF istep 1 = THEN
+ FLUX := FLU: SYS LIBRARY2 TRACKN
+ :: EDIT 1 TYPE K B1 SIGS ;
+ ELSE
+ FLUX := FLU: FLUX SYS LIBRARY2 TRACKN
+ :: EDIT 1 TYPE K B1 SIGS ;
+ ENDIF ;
+
+ GREP: FLUX :: GETVAL 'B2 B1HOM ' 1 1 1 >>B2<< ;
+ ECHO "B2-1 = " B2 " at BU = " BUend ;
+
+ GREP: FLUX :: GETVAL 'K-INFINITY ' 1 1 1 >>Kinf1<< ;
+ ECHO "K-inf1_sortie is " Kinf1 " at BU = " BUend ;
+
+ SYS := DELETE: SYS ;
+************************************************************************
+* END FLUX CALCULATION *
+************************************************************************
+
+END: ;
+QUIT .