Mars Code Manual Programmer'S Manual: Thermal Hydraulic Safety Research Department

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

KAERI/TR-3150/2006

MARS CODE MANUAL


VOLUME III:
PROGRAMMER’S MANUAL

Thermal Hydraulic Safety research Department

Dec 2009

KOREA ATOMIC ENERGY RESEARCH INSTITUTE

150 Dukjin-dong, Yuseong


Daejon 305-353 Korea
CONTENTS
Page
1 INTRODUCTION .........................................................................................................................1
2 CODING CONVENTIONS ..........................................................................................................3
2.1 Programming Language ...................................................................................................3
2.2 Preprocessors....................................................................................................................3
2.2.1 Preprocessor symbol............................................................................................3
2.3 Static and Dynamic Storage .............................................................................................3
2.4 Input Deck Structure.........................................................................................................4
2.5 Restart/Plot File Structure ................................................................................................4
3 PROGRAM STRUCTURE ...........................................................................................................5
3.1 Main Driver MARS..........................................................................................................7
3.2 ExtraJobControl Module ..................................................................................................7
3.3 InputDataProcessM Module.............................................................................................8
3.4 ReadNewProblemM Module............................................................................................8
3.4.1 Description of Driver and Associated Subroutines .............................................9
3.5 ReadComponentM Module ............................................................................................15
3.6 InitializeNewM Module .................................................................................................16
3.6.1 Description of Driver and Associated Subroutines ...........................................17
3.6.2 Card Number, Subroutine Name, and Common Block Connections ................21
3.7 TransientControlM Module............................................................................................25
3.7.1 TransientSet.......................................................................................................25
3.7.2 TransientAdvance (from TransientAdvanceM).................................................26
3.7.3 TransientFinal....................................................................................................29
3.8 HydroSolveM Module....................................................................................................30
3.8.1 stcset ..................................................................................................................32
3.8.2 Valve..................................................................................................................32
3.8.3 AccumLevel ......................................................................................................32
3.8.4 VolumeVelocity .................................................................................................33
3.8.5 ThermalFront.....................................................................................................33
3.8.6 GetInterphaseHTC ............................................................................................34
3.8.7 GetInterphaseDrag.............................................................................................34
3.8.8 WallDrag............................................................................................................35
3.8.9 HeadLoss ...........................................................................................................35
3.8.10 VelocityExplicit .................................................................................................35
3.8.11 chokeFlow .........................................................................................................36
3.8.12 CCFL .................................................................................................................37
3.8.13 VelocityFinal .....................................................................................................37

i KAERI/TR-3150/2006
3.8.14 EquationFinal ....................................................................................................38
3.8.15 ImplicitVelocity .................................................................................................39
3.8.16 ImplicitPressure.................................................................................................40
3.8.17 ImplicitEnergy...................................................................................................40
3.8.18 SetJunctionProperty...........................................................................................40
3.8.19 BoronTransport..................................................................................................41
3.8.20 SetVolumeProperty............................................................................................41
3.8.21 StateACCUM ....................................................................................................42
3.8.22 StateVolumes .....................................................................................................42
3.8.23 LevelTrack.........................................................................................................42
3.8.24 SetJunctionProperty...........................................................................................42
3.8.25 VolumeAvgVelocity...........................................................................................42
3.8.26 HeatStrFinal.......................................................................................................43
3.9 HeatStrSolve Module .....................................................................................................43
3.9.1 HeatStrAdvance.................................................................................................43
3.9.2 RadiationHT ......................................................................................................43
3.9.3 QFDrive.............................................................................................................44
3.9.4 Transient2D .......................................................................................................44
3.9.5 Transient1D .......................................................................................................44
3.9.6 SetBoundary ......................................................................................................44
3.10 WallHeatTransfer Module ..............................................................................................44
3.10.1 GETHTCoefficient ............................................................................................44
3.10.2 CHFCalculation.................................................................................................44
3.10.3 SinglePhase .......................................................................................................45
3.10.4 PreCHF..............................................................................................................45
3.10.5 PreCHFBundle ..................................................................................................45
3.11 Reactor Kinetics Subroutines .........................................................................................45
3.11.1 ReactorKinetics ( from TransientAdvanceM Module)......................................45
3.11.2 ReadReactorKinetics (from ReadNewProblemM Module) ..............................45
3.11.3 InitReactorKinetics (from IntializeNewM Module)..........................................45
3.12 Control System Subroutines ...........................................................................................46
3.12.1 ControlVar (from TransientAdvanceM Module)...............................................46
3.12.2 ReadControlVar(from ReadNewProblemM Module) .......................................46
3.12.3 InitControlVar (from IntializeNewM Module)..................................................46
3.13 Output Files ....................................................................................................................46
3.13.1 Major Edits ........................................................................................................46
3.13.2 Minor Edits........................................................................................................46
3.13.3 Strip Edits ..........................................................................................................46
3.13.4 Screen Edits.......................................................................................................47
3.13.5 Debug Edits .......................................................................................................47
3.13.6 Binary Restart/Plot Files ...................................................................................47
4 CODE DATABASE.....................................................................................................................49
4.1 Labeled Common Blocks ...............................................................................................49
4.1.1 Main control database - contrl.h - /contrl/ and /rstsum/ ....................................49

KAERI/TR-3150/2006 ii

You might also like