### Full NUCLEAR_WASTE_CHEMISTRY Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/subsurface/nuclear_waste_chemistry.rst An example demonstrating the complete setup of the NUCLEAR_WASTE_CHEMISTRY card with multiple SPECIES blocks. ```pflotran NUCLEAR_WASTE_CHEMISTRY SPECIES NAME AM241L SOLUBILITY 3.08531847680638d-03 # [mol/m^3-liq] PRECIPITATE_MOLAR_DENSITY 38.61d3 # [mol/m^3-mnrl] (quartz example) ELEMENTAL_KD 0.0d0 # [m^3-water/m^3-bulk] / SPECIES NAME PU239L SOLUBILITY 5.94620667361208d-03 # [mol/m^3-liq] PRECIPITATE_MOLAR_DENSITY 38.61d3 # [mol/m^3-mnrl] (quartz example) ELEMENTAL_KD 0.0d0 # [m^3-water/m^3-bulk] / SPECIES NAME PU238L SOLUBILITY 1.72615583236094d-05 # [mol/m^3-liq] PRECIPITATE_MOLAR_DENSITY 38.61d3 # [mol/m^3-mnrl] (quartz example) ELEMENTAL_KD 0.0d0 # [m^3-water/m^3-bulk] / / ``` -------------------------------- ### Compile PETSc Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/linux.rst Compiles the PETSc libraries after configuration. Provides two examples: a standard 'make all' and a more specific command based on configuration output. ```bash cd $PETSC_DIR make all ``` ```bash make PETSC_DIR=/proj/geo002/petsc PETSC_ARCH=cray-xt4-pgi all ``` -------------------------------- ### Compiler Verification Commands Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Commands to verify the installation and configuration of C/C++ and Fortran compilers on Windows. ```bash cl foo.c ``` ```bash ifort foo.f ``` -------------------------------- ### PFLOTRAN HYDRATE Example Configuration Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/simulation/subsurface_flow_modes/hydrate_card.rst An example PFLOTRAN input snippet demonstrating the configuration of the HYDRATE mode, including simulation setup, Newton solver, and various HYDRATE block parameters. ```APIDOC SIMULATION SIMULATION_TYPE SUBSURFACE PROCESS_MODELS SUBSURFACE_FLOW flow MODE HYDRATE / / END ... SUBSURFACE NUMERICAL_METHODS FLOW NEWTON_SOLVER USE_INFINITY_NORM_CONVERGENCE / / ... HYDRATE GAS CH4 PERM_SCALING_FUNCTION DAI_AND_SEOL WITH_GIBBS_THOMSON GT_3PHASE ADJUST_SOLUBILITY_WITHIN_GHSZ WITH_SEDIMENTATION METHANOGENESIS NAME ss_methanogenesis ALPHA 0.005 K_ALPHA 2241 LAMBDA 1.d-14 V_SED 3.17d-11 SMT_DEPTH 10.d0 / / ... ``` -------------------------------- ### Input File Setup: Primary Species and Minerals Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/gdsa/ufd_decay_card.rst Example of setting up primary species and corresponding minerals (with '(s)' appended) in the input deck, along with mineral kinetics with a zero rate constant. ```pflotran PRIMARY_SPECIES I127 I129 Am241 ... Th232 / MINERALS I127(s) I129(s) Am241(s) ... Th232(s) / MINERAL_KINETICS I127(s) RATE_CONSTANT 0.d0 / I129(s) RATE_CONSTANT 0.d0 / Am241(s) RATE_CONSTANT 0.d0 / ... Th232(s) RATE_CONSTANT 0.d0 / / ``` -------------------------------- ### PFLOTRAN Input Record File Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/simulation/input_record_file_card.rst This snippet shows an example of the content generated in a PFLOTRAN input record file. The file details simulation settings, including simulation type, process models, checkpointing, timing, output file configurations, grid properties, and region definitions. It serves as a comprehensive log of the simulation's setup. ```pflotran -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- PFLOTRAN INPUT RECORD 12/02/2016 16:42 (-07:00 UTC) -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- input file: bf_krp12.in group: n processors: 1 -------------------------------------------------------------------------------- ---------------------------: CHECKPOINTS specific times: OFF ---------------------------: pmc: PMCSubsurface pmc timestepper: FLOW initial timestep size: 8.6400000000000006 sec pm: flow mode: general -------------------------------------------------------------------------------- simulation type: subsurface flow mode: general -------------------------------------------------------------------------------- ---------------------------: TIME max. timestep: 1.0000000E-01 yr at time 0.0000000E+00 yr final time: 1.0000000E+00 yr -------------------------------------------------------------------------------- ---------------------------: OUTPUT FILES periodic screen: ON screen increment: 1 output time unit: yr ---------------------------: snapshot file output periodic timestep: OFF periodic time: OFF specific times: ON times (yr): 1.0000000E+00 , variable list: Temperature [C] Liquid Pressure [Pa] Gas Pressure [Pa] Liquid Saturation [] Gas Saturation [] Liquid Density [kg/m^3] Gas Density [kg/m^3] X_g^l [] X_l^l [] X_g^g [] X_l^g [] Liquid Energy [MJ/kmol] Gas Energy [MJ/kmol] Thermodynamic State [] Material ID [] print initial time: ON print final time: ON ---------------------------: observation file output format: tecplot periodic timestep: OFF periodic time: OFF specific times: OFF variable list: Temperature Liquid Pressure [Pa] Gas Pressure [Pa] Liquid Saturation [] Gas Saturation [] Liquid Density [kg/m^3] Gas Density [kg/m^3] X_g^l [] X_l^l [] X_g^g [] X_l^g [] Liquid Energy [MJ/kmol] Gas Energy [MJ/kmol] Thermodynamic State [] Material ID [] print initial time: ON print final time: ON ---------------------------: mass balance file output format: tecplot periodic timestep: OFF periodic time: OFF specific times: OFF print initial time: OFF print final time: ON -------------------------------------------------------------------------------- ---------------------------: GRID grid type: structured cartesian number grid cells X: 10 number grid cells Y: 1 number grid cells Z: 1 delta-X (m): 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 1.0000E+01 delta-Y (m): 1.0000E+01 delta-Z (m): 1.0000E+01 bounds X: 0.0000000E+00 ,1.0000000E+02 m bounds Y: 0.0000000E+00 ,1.0000000E+01 m bounds Z: 0.0000000E+00 ,1.0000000E+01 m global origin: (x) 0.0000000E+00 m : (y) 0.0000000E+00 m : (z) 0.0000000E+00 m -------------------------------------------------------------------------------- ---------------------------: REGIONS region: all defined by: COORDINATE(S) X coordinate(s): 0.0000000E+00 1.0000000E+02 m ``` -------------------------------- ### Input File Setup: Constraints and Concentrations Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/gdsa/ufd_decay_card.rst Example of defining constraints, including initial concentrations for primary species and mineral saturation states, which are necessary for the simulation. ```pflotran CONSTRAINT initial CONCENTRATIONS I127 1.d-20 F I129 1.d-20 F Am241 1.d-20 F ... Th232 1.d-20 F / MINERALS I127(s) 1.d-4 1.d0 I129(s) 0.d0 1.d0 Am241(s) 1.d-4 1.d0 ... Th232(s) 0.d0 1.d0 / / ``` -------------------------------- ### PFLOTRAN Example Output Configuration Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/subsurface/output_card.rst An example demonstrating the configuration of SNAPSHOT_FILE, OBSERVATION_FILE, and MASS_BALANCE_FILE blocks within the OUTPUT block. ```APIDOC OUTPUT TIME_UNITS yr SNAPSHOT_FILE FORMAT HDF5 MULTIPLE_FILES TIMES_PER_FILE 10 NO_PRINT_INITIAL PERIODIC TIME 100 day VARIABLES LIQUID_PRESSURE GAS_PRESSURE CAPILLARY_PRESSURE TEMPERATURE / / OBSERVATION_FILE NO_PRINT_INITIAL NO_PRINT_FINAL TIMES y 0.23d0 9.712d0 VARIABLES TEMPERATURE POROSITY PERMEABILITY / / MASS_BALANCE_FILE PERIODIC TIME 1 w between 1 y and 2 y PERIODIC TIMESTEP 5 / / ``` -------------------------------- ### PFLOTRAN NEWTON_SOLVER Block Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/theory_guide/wipp_soln_controls.rst Example configuration for the NEWTON_SOLVER block in PFLOTRAN, demonstrating the usage of MAXIT. ```APIDOC NEWTON_SOLVER FLOW MAXIT 10 END ``` -------------------------------- ### PFLOTRAN: WASTE_PANEL Block Examples Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/wipp/wipp_source_sink_card.rst Examples of full WASTE_PANEL blocks, showing different configurations for region, inventory, and scaling. ```fortran WASTE_PANEL waste_panel_9 REGION wp9 INVENTORY inv1 SCALE_BY_VOLUME yes / WASTE_PANEL waste_panel_5 REGION wp5 INVENTORY inv88 SCALE_BY_VOLUME no / ``` -------------------------------- ### PFLOTRAN WELLBORE_MODEL Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/simulation/well_model.rst Demonstrates the setup of a WELLBORE_MODEL, including defining well grid properties like the number of segments and trajectory, as well as well physical properties such as diameter, friction coefficient, skin factor, and well index model. It also shows the usage of USE_WELL_COUPLER. ```APIDOC SIMULATION SIMULATION_TYPE SUBSURFACE PROCESS_MODELS SUBSURFACE_FLOW flow MODE SCO2 END WELL_MODEL well OPTIONS FLOW_COUPLING FULLY_IMPLICIT TYPE HYDROSTATIC END END END END ... WELLBORE_MODEL well1 WELL_GRID NUMBER_OF_SEGMENTS 4 WELL_TRAJECTORY # Must start from SURFACE_ORIGIN and proceed sequentially. # Will populate 1 well segment per reservoir cell occupied # Must specify if each segment is CASED or UNCASED SURFACE_ORIGIN 15.d0 5.d0 2.d2 SEGMENT_DXYZ CASED 0.d0 0.d0 -149.d0 SEGMENT_DXYZ UNCASED 0.d0 0.d0 -51.d0 / / WELL DIAMETER 0.16d0 FRICTION_COEFFICIENT 1.d0 SKIN_FACTOR 0.d0 WELL_INDEX_MODEL PEACEMAN_3D / USE_WELL_COUPLER END WELLBORE_MODEL well2 WELL_GRID NUMBER_OF_SEGMENTS 4 WELL_TRAJECTORY # Must start from SURFACE_ORIGIN and proceed sequentially. # Will populate 1 well segment per reservoir cell occupied # Must specify if each segment is CASED or UNCASED SURFACE_ORIGIN 35.d0 5.d0 2.d2 SEGMENT_DXYZ CASED 0.d0 0.d0 -149.d0 SEGMENT_DXYZ UNCASED 0.d0 0.d0 -51.d0 / / WELL DIAMETER 0.16d0 FRICTION_COEFFICIENT 1.d0 SKIN_FACTOR 0.d0 WELL_INDEX_MODEL PEACEMAN_3D / USE_WELL_COUPLER END ... WELL_COUPLER well1 FLOW_CONDITION injection_well_1 WELL well1 END WELL_COUPLER well2 FLOW_CONDITION injection_well_2 WELL well2 END ... ``` -------------------------------- ### WIPP_FLOW Mode Solution Controls Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/theory_guide/wipp_soln_controls.rst An example of a SIMULATION block in an input deck demonstrating the usage of WIPP_FLOW mode solution control parameters. ```fortran SIMULATION SIMULATION_TYPE SUBSURFACE PROCESS_MODELS SUBSURFACE_FLOW FLOW MODE WIPP_FLOW OPTIONS FIX_UPWIND_DIRECTION GAS_COMPONENT_FORMULA_WEIGHT 2.01588D0 ! H2 kg/kmol LIQUID_EQUATION_TOLERANCE 1.d-6 GAS_EQUATION_TOLERANCE 1.d-6 LIQUID_PRESSURE_TOLERANCE 1.d-5 GAS_SATURATION_TOLERANCE 1.d-4 ! (same functionality as EPS_SAT) PRESSURE_REL_PERTURBATION 1.d-8 PRESSURE_MIN_PERTURBATION 1.d-2 SATURATION_REL_PERTURBATION 1.d-8 SATURATION_MIN_PERTURBATION 1.d-10 DTIMEMAX 1.25 SATLIMIT 1.d-3 DSATLIM 0.20 DSAT_MAX 1.0d-2 SATNORM 3.d-1 TSWITCH 1.d-2 EPS_PRES 1.d-2 EPS_SAT 4 ! (same functionality as GAS_SATURATION_TOLERANCE) DPRELIM -1.d8 ! Pa DPRES_MAX 1.d7 ! Pa PRESNORM 5.d5 ! Pa LSCALE DO_NOT_LSCALE P_SCALE 1.d7 END END END END ``` -------------------------------- ### Install PFLOTRAN Dependencies on Ubuntu Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_wsl.rst Installs necessary development tools and libraries for PFLOTRAN on an Ubuntu distribution within WSL. This includes compilers, build tools, and MPI libraries. ```bash sudo apt update --fix-missing sudo apt install gcc gfortran make cmake python libtool autoconf build-essential pkg-config automake tcsh mpich ``` -------------------------------- ### Configure PETSc Installation Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/linux.rst Configures the PETSc installation with optimization flags, disables debugging, and enables automatic downloads for MPICH, HDF5 (with Fortran bindings), BLAS/LAPACK, METIS, and ParMETIS. Includes an option for HDF5 zlib compression. ```bash ./configure --COPTFLAGS='-O3' --CXXOPTFLAGS='-O3' --FOPTFLAGS='-O3 -Wno-unused-function -fallow-argument-mismatch' --with-debugging=no --download-mpich=yes --download-hdf5=yes --download-hdf5-fortran-bindings=yes --download-fblaslapack=yes --download-metis=yes --download-parmetis=yes # To support HDF5 zlib compression, add "--download-hdf5-configure-arguments=\"--with-zlib=yes\"" to the command line. ``` -------------------------------- ### ERB Model Examples Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/gdsa/ufd_biosphere_card.rst Provides concrete examples of how to set up ERB_1A and ERB_1B blocks in a PFLOTRAN input file, illustrating the usage of required and optional cards. ```pflotran ERB_1A A_model1 REGION well INDIVIDUAL_CONSUMPTION_RATE 5.d0 L/day INCLUDE_UNSUPPORTED_RADS / ERB_1B B_model1 REGION potential-well-22c DILUTION_FACTOR 2.d0 INDIVIDUAL_CONSUMPTION_RATE 2.d0 L/day INCLUDE_UNSUPPORTED_RADS / ERB_1B B_model2 REGION potential-well-67f DILUTION_FACTOR 1.d0 INDIVIDUAL_CONSUMPTION_RATE 3.d0 L/day / ``` -------------------------------- ### CLM-CN Reaction Sandbox Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/subsurface/chemistry/reaction_sandbox/clm_cn_card.rst Example demonstrating the configuration of CLM-CN reactions within a REACTION_SANDBOX block, including pool definitions and reaction parameters. ```APIDOC REACTION_SANDBOX CLM-CN POOLS SOM1 12.d0 SOM2 12.d0 SOM3 10.d0 SOM4 10.d0 Lit1 Lit2 Lit3 / REACTION UPSTREAM_POOL Lit1 DOWNSTREAM_POOL SOM1 TURNOVER_TIME 20. h RESPIRATION_FRACTION 0.39d0 N_INHIBITION 1.d-10 / REACTION UPSTREAM_POOL Lit2 DOWNSTREAM_POOL SOM2 TURNOVER_TIME 14. d RESPIRATION_FRACTION 0.55 N_INHIBITION 1.d-10 / REACTION UPSTREAM_POOL Lit3 DOWNSTREAM_POOL SOM3 TURNOVER_TIME 71. d RESPIRATION_FRACTION 0.29d0 N_INHIBITION 1.d-10 / REACTION UPSTREAM_POOL SOM1 DOWNSTREAM_POOL SOM2 TURNOVER_TIME 14. d RESPIRATION_FRACTION 0.28d0 N_INHIBITION 1.d-10 / REACTION UPSTREAM_POOL SOM2 DOWNSTREAM_POOL SOM3 TURNOVER_TIME 71. d RESPIRATION_FRACTION 0.46d0 N_INHIBITION 1.d-10 / REACTION UPSTREAM_POOL SOM3 DOWNSTREAM_POOL SOM4 TURNOVER_TIME 2. y RESPIRATION_FRACTION 0.55d0 N_INHIBITION 1.d-10 / REACTION UPSTREAM_POOL SOM4 TURNOVER_TIME 27.4 y RESPIRATION_FRACTION 1.d0 N_INHIBITION 1.d-10 / / / ``` -------------------------------- ### PFLOTRAN Simulation Output Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/running.rst This snippet shows an example of the screen output generated during a PFLOTRAN simulation, including general flow information and convergence details for each simulation step. ```text ... ... == GENERAL FLOW ================================================================ 0 2r: 1.87E-04 2x: 0.00E+00 2u: 0.00E+00 ir: 7.72E-05 iu: 0.00E+00 rsn: 0 1 2r: 9.69E-07 2x: 7.11E+06 2u: 3.83E-03 ir: 9.69E-07 iu: 1.57E-03 rsn: stol Step 52 Time= 9.77040E+00 Dt= 2.50000E-01 [day] snes_conv_reason: 4 newton = 1 [ 70] linear = 1 [ 70] cuts = 0 [ 0] --> SNES Linear/Non-Linear Iterations = 1 / 1 --> SNES Residual: 9.689780E-07 4.844890E-08 9.686628E-07 --> max chng: dpl= 0.0000E+00 dpg= 0.0000E+00 dpa= 0.0000E+00 dxa= 2.1661E-12 dt= 1.5734E-03 dsg= 0.0000E+00 == GENERAL FLOW ================================================================ 0 2r: 1.84E-04 2x: 0.00E+00 2u: 0.00E+00 ir: 7.59E-05 iu: 0.00E+00 rsn: 0 ``` -------------------------------- ### PFLOTRAN Example Input Files Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/faq.rst A collection of example PFLOTRAN input files demonstrating various configurations and functionalities, including material properties, flow conditions, and dataset initializations. ```bash PFLOTRAN_DIR/regression_tests/default/543/543_hanford_srfcplx_param.in ``` ```bash PFLOTRAN_DIR/regression_tests/default/infiltrometer/16m.in ``` ```bash PFLOTRAN_DIR/regression_tests/shortcourse/regional_doublet/stochastic_regional_doublet_small.in ``` ```bash PFLOTRAN_DIR/regression_tests/default/543/543_flow.in ``` ```bash PFLOTRAN_DIR/regression_tests/default/condition/datum_dataset.in ``` ```bash PFLOTRAN_DIR/regression_tests/default/condition/543_datum_dataset.in ``` ```bash PFLOTRAN_DIR/regression_tests/default/543/543_timeseries.in ``` -------------------------------- ### PFLOTRAN Example: Basic Microbial Reaction Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/subsurface/chemistry/microbial_reaction_card.rst An example demonstrating the setup of a basic microbial reaction with Monod kinetics for donor and acceptor, and MONOD type inhibition. ```pflotran CHEMISTRY PRIMARY_SPECIES A(aq) B(aq) C(aq) / MICROBIAL_REACTION REACTION A(aq) + 2 B(aq) <-> 1.5 C(aq) RATE_CONSTANT 1.d-12 MONOD SPECIES_NAME A(aq) ! A is the donor HALF_SATURATION_CONSTANT 1.d-5 / MONOD SPECIES_NAME B(aq) ! B is the acceptor HALF_SATURATION_CONSTANT 1.d-4 / INHIBITION ! inhibit at high C(aq) concentration SPECIES_NAME C(aq) TYPE MONOD INHIBIT_ABOVE_THRESHOLD THRESHOLD_CONCENTRATION 6.d-4 / / / ``` -------------------------------- ### Clone PFLOTRAN Repository Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Clones the PFLOTRAN repository from Bitbucket. An alternative SSH method is provided if the HTTPS clone fails. ```bash git clone https://bitbucket.org/pflotran/pflotran ``` ```bash git clone ssh://git@bitbucket.org/pflotran/pflotran ``` -------------------------------- ### PFLOTRAN Example: Advanced Microbial Reaction with Activity Units Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/subsurface/chemistry/microbial_reaction_card.rst An example showcasing advanced microbial reaction setup using activity units, SMOOTHSTEP inhibition, and including immobile biomass. ```pflotran CHEMISTRY PRIMARY_SPECIES A(aq) B(aq) C(aq) / IMMOBILE_SPECIES D(im) / MICROBIAL_REACTION CONCENTRATION_UNITS ACTIVITY REACTION A(aq) + 2 B(aq) <-> 1.5 C(aq) RATE_CONSTANT 1.d-6 MONOD SPECIES_NAME A(aq) HALF_SATURATION_CONSTANT 1.d-5 ! A is the donor THRESHOLD_CONCENTRATION 1.d-20 / MONOD SPECIES_NAME B(aq) HALF_SATURATION_CONSTANT 1.d-4 ! B is the acceptor THRESHOLD_CONCENTRATION 1.d-11 / INHIBITION ! inhibit at low A(aq) concentration SPECIES_NAME A(aq) TYPE SMOOTHSTEP SMOOTHSTEP_INTERVAL 1. INHIBIT_BELOW_THRESHOLD THRESHOLD_CONCENTRATION 1.d-6 / BIOMASS SPECIES_NAME D(im) YIELD 0.01d0 / / IMMOBILE_DECAY_REACTION SPECIES_NAME D(im) RATE_CONSTANT 1.d-9 / ... / ``` -------------------------------- ### PFLOTRAN Full Example: Criticality Mechanism Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/gdsa/waste_form_general_card.rst A complete example demonstrating the setup of a criticality mechanism within a PFLOTRAN simulation, including waste form properties, criticality mechanism details, and spacer degradation mechanism. ```APIDOC WASTE_FORM REGION wf EXPOSURE_FACTOR 1.d0 VOLUME 1.5d0 m^3 MECHANISM_NAME csnf CANISTER_BREACH_TIME 2.50d+2 y CRITICALITY_MECHANISM_NAME crit_01 SPACER_MECHANISM_NAME spc_01 / CRITICALITY_MECH NAME crit_01 CRIT_START 3.00d+2 y CRIT_END 2.00d+3 y CRITICAL_WATER_SATURATION 0.700d+0 CRITICAL_WATER_DENSITY 9.200d+2 kg/m^3 HEAT_OF_CRITICALITY CONSTANT_POWER 4.0d+0 kW # DATASET criticality_heat.txt / DECAY_HEAT TOTAL DATASET ./decay_heat.txt / INVENTORY DATASET ./inventory_crit.txt / / SPACER_DEGRADATION_MECHANISM NAME spc_01 METAL_LOSS_RATIO 4.42953d-04 m^3/kg THICKNESS 5.00000d-04 m EXPOSURE_LEVEL 9.93317d-01 C 3.47000d+07 mg/day-dm^2 Q 2.27570d+04 cal/mol RAD_FACTOR 2.00000d+00 / ``` -------------------------------- ### Fortran: Reaction Sandbox - ExampleCreate Subroutine Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/theory_guide/reaction_sandbox.rst Illustrates the ExampleCreate subroutine for allocating and initializing a new reaction object in the Reaction Sandbox. It emphasizes nullifying the 'next' pointer from the base class. ```fortran allocate(ExampleCreate) ExampleCreate%species_name = '' ExampleCreate%species_id = 0 ExampleCreate%rate_constant = 0.d0 nullify(ExampleCreate%next) ``` -------------------------------- ### Clone PFLOTRAN Repository Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/linux.rst Clones the PFLOTRAN source code repository from Bitbucket. ```bash git clone https://bitbucket.org/pflotran/pflotran ``` -------------------------------- ### PFLOTRAN Reaction Kinetics Example Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/benchmark.rst Illustrates the setup for a single irreversible reaction (A + 2B -> C) in a 1D column, including advection, diffusion, and reaction rate definitions. ```pflotran # == GENERAL_REACTION Example ===================================================== GENERAL_REACTION Example # Reaction: A + 2 B -> C # Stoichiometric coefficients: nu_A = 1, nu_B = 2, nu_C = -1 # Rate: R = k_f * C_A^nu_A * C_B^nu_B # Parameters: # Length: 100 m # Darcy velocity: 1 m/y # Diffusion coefficient: 10^-9 m^2/s # Porosity: 0.25 # Initial concentration: C_inf # Boundary concentration at x=0: C_0 # Boundary condition at x=L: dC/dx = 0 END ``` -------------------------------- ### Test PETSc Compilation Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Runs tests to verify the PETSc compilation. It's noted that the second statement (test) might not work. ```bash make PETSC_DIR=c/cygdrive/c/software/petsc-git PETSC_ARCH=arch-mswin-c-debug test ``` -------------------------------- ### Clone PETSc Repository Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Clones the PETSc repository from GitLab and checks out a specific commit. This is a prerequisite for building PFLOTRAN. ```bash git clone https://gitlab.com/petsc/petsc petsc cd petsc git checkout 8c7fbf4f8491a74970a1205819563feba7a8e746 ``` -------------------------------- ### Contributing to PFLOTRAN Documentation Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/faq.rst Outlines the steps for contributing to the PFLOTRAN documentation using both the Fork Option (beginner) and Branch Option (advanced). It includes Git commands for cloning, branching, committing, and pushing changes. ```bash git clone git@bitbucket.org:pflotran/pflotran-documentation.git ``` ```bash git checkout -b username/brief-description ``` ```bash git commit -i -m 'a short message describing the changes' ``` ```bash git push ``` -------------------------------- ### VisIt: Geomechanical and Flow Data Visualization Setup Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/visualization.rst A comprehensive guide for setting up simultaneous visualization of geomechanical and flow data in VisIt. This involves multiple steps across different windows and applying various operators and expressions. ```VisIt 1. Open VisIt. 2. Select the 1x2 layout button on Window 1 to open a new window (Window 2). 3. Make Window 1 active. 4. Click on Open and select *-geomech-*.xmf database. 5. Click on Add -> Pseudocolor -> rel_disp_z and click Draw. 6. Select the domain and rotate it. 7. Select Window 2 and make it active. 8. Click Open and select pflotran.h5 or pflotran-*.h5. 9. Click on Add -> Pseudocolor -> Gas Saturation. 10. Click on Lock view and Lock time on both windows. 11. Select Yes when a window pops up. 12. With Window 2 active, select: Operators -> Slicing -> ThreeSlice. 13. Double click on three slice and change x and y to appropriate values. 14. Select Window 1. 15. Select Controls -> Expressions. 16. Click New and add a name (e.g., disp_vector). Select Vector Mesh Variable. 17. Under Definition, add ,,, Apply and Dismiss. 18. Click Add -> Vector -> disp_vector. 19. Double click Vector under pflotran-geomech-*.xmf database:disp_vector. 20. Select Form and set Scale to e.g. 0.5. Change magnitude color from Default to difference. 21. Apply and Dismiss. 22. Double click Pseudocolor -> rel_disp_z. Set color table and opacity. 23. Click: Operators -> Transforms -> Displace. 24. Double click Displace, change Displacement multiplier and Displacement Variable to Vectors -> disp_vectors. 25. Click the play button to watch movie. ``` -------------------------------- ### Getting Help with PFLOTRAN Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/faq.rst Provides commands to gather essential information for seeking help with PFLOTRAN, including Git revision, PETSc version, and test status. It also shows how to capture PFLOTRAN output. ```bash git log -1 ``` ```bash git status ``` ```bash cd ${PETSC_DIR} git log -1 HEAD ``` ```bash cd ${PFLOTRAN_DIR}/src/pflotran make test ``` ```bash ./pflotran -input_prefix my-problem &> my-problem.stdout.txt ``` -------------------------------- ### PFLOTRAN WIPP_FLOW Example Configuration Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/cards/simulation/subsurface_flow_modes/wipp_flow_card.rst Illustrates a PFLOTRAN simulation setup using the WIPP_FLOW subsurface flow mode. It includes various options for gas component properties, boundary conditions, and physical process controls. ```fortran SIMULATION ... PROCESS_MODELS SUBSURFACE_FLOW flow MODE WIPP_FLOW OPTIONS GAS_COMPONENT_FORMULA_WEIGHT 2.01588d0 #hardwired 2D_FLARED_DIRICHLET_BCS EXTERNAL_FILE ../dirichlet_bcs.txt / ALLOW_NEGATIVE_GAS_PRESSURE ALPHA_DATASET alpha BRAGFLO_RESIDUAL_UNITS DIP_ROTATION_ANGLE 1.d0 DIP_ROTATION_ORIGIN 23495.7d0 0.d0 378.685d0 DIP_ROTATION_CEILING 779.69d0 DIP_ROTATION_BASEMENT 178.07d0 DIP_ROTATION_REGIONS rSHFTU / / / END ... SUBSURFACE NUMERICAL_METHODS FLOW TIMESTEPPER LIQ_PRES_CHANGE_TS_GOVERNOR 5.d5 ! PRESNORM GAS_SAT_CHANGE_TS_GOVERNOR 0.3d0 ! SATNORM GAS_SAT_GOV_SWITCH_ABS_TO_REL 1.d0 ! TSWITCH / NEWTON_SOLVER CONVERGENCE_TEST BOTH ! ICONVTEST 1 SCALE_JACOBIAN ! LSCALE GAS_RESIDUAL_INFINITY_TOL 1.d-2 ! FTOL_PRES GAS_SAT_THRESH_FORCE_EXTRA_NI 1.d-3 ! SATLIMIT GAS_SAT_THRESH_FORCE_TS_CUT 0.2d0 ! DSATLIM LIQUID_RESIDUAL_INFINITY_TOL 1.d-2 ! FTOL_SAT MAX_ALLOW_GAS_SAT_CHANGE_TS 1.d0 ! DSAT_MAX MAX_ALLOW_LIQ_PRES_CHANGE_TS 1.d7 ! DPRES_MAX MAX_ALLOW_REL_GAS_SAT_CHANGE_NI 1.d-3 ! EPS_SAT MAX_ALLOW_REL_LIQ_PRES_CHANG_NI 1.d-2 ! EPS_PRES MIN_LIQ_PRES_FORCE_TS_CUT -1.d8 ! DPRELIM MINIMUM_TIMESTEP_SIZE 8.64d-4 ! DELTMIN / / ... ``` -------------------------------- ### PFLOTRAN Simulation Setup: Simple Flow Problem Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/simple_flow_problem.rst This snippet outlines the configuration for a 1D vertical column simulation in PFLOTRAN, focusing on saturated flow using the RICHARDS mode. It includes discretization, material properties, characteristic curves, output settings, time parameters, region definitions, and flow conditions. ```pflotran #Description: 1D infiltration SIMULATION SIMULATION_TYPE SUBSURFACE PROCESS_MODELS SUBSURFACE_FLOW flow MODE RICHARDS / / END SUBSURFACE #=========================== discretization =================================== :ref:`grid-card` TYPE structured ORIGIN 0.d0 0.d0 0.d0 NXYZ 1 1 10 DXYZ 1.d0 1.d0 1.d0 / END #=========================== material properties ============================== :ref:`material-property-card` soil ID 1 POROSITY 0.33 TORTUOSITY 0.5d0 :ref:`characteristic-curves-card` cc1 PERMEABILITY PERM_X 1.d-10 ! ~100 m/d PERM_Y 1.d-10 PERM_Z 1.d-10 / / #=========================== saturation functions ============================= :ref:`characteristic-curves-card` cc1 SATURATION_FUNCTION VAN_GENUCHTEN LIQUID_RESIDUAL_SATURATION 0.1d0 M 0.8d0 ALPHA 1.d-4 / PERMEABILITY_FUNCTION MUALEM_VG_LIQ LIQUID_RESIDUAL_SATURATION 0.1d0 M 0.8d0 / / #=========================== output options =================================== :ref:`output-card` FORMAT TECPLOT POINT / #=========================== times ============================================ :ref:`time-card` FINAL_TIME 10.d0 y MAXIMUM_TIMESTEP_SIZE 0.1d0 y / #=========================== regions ========================================== :ref:`region-card` all COORDINATES 0.d0 0.d0 0.d0 1.d0 1.d0 10.d0 / END :ref:`region-card` top COORDINATES 0.d0 0.d0 10.d0 1.d0 1.d0 10.d0 / FACE TOP END :ref:`region-card` bottom COORDINATES 0.d0 0.d0 0.d0 1.d0 1.d0 0.d0 / FACE BOTTOM END #=========================== flow conditions ================================== :ref:`flow-condition-card` top TYPE LIQUID_FLUX NEUMANN / LIQUID_FLUX 3.171d-10 ! 1 cm/yr END :ref:`flow-condition-card` initial TYPE LIQUID_PRESSURE HYDROSTATIC / LIQUID_PRESSURE 101325.d0 END #=========================== condition couplers =============================== # initial condition :ref:`initial-condition-card` :ref:`flow-condition-card` initial :ref:`region-card` all END # top boundary condition :ref:`boundary-condition-card` :ref:`flow-condition-card` top :ref:`region-card` top END # bottom boundary condition :ref:`boundary-condition-card` :ref:`flow-condition-card` initial :ref:`region-card` bottom END #=========================== stratigraphy couplers ============================ :ref:`strata-card` :ref:`region-card` all MATERIAL soil END END_SUBSURFACE ``` -------------------------------- ### Visual Studio Linker Settings Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Specifies the necessary settings for the linker within Visual Studio for PFLOTRAN development. This includes additional library directories, ignored libraries, and additional dependencies. ```linker General | Additional library directories | Input | Ignore all default libraries | No Input | Ignore specific libraries | Manifest file | Generate manifest | No Input | Additional dependencies | ``` -------------------------------- ### Compile PETSc Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Compiles the PETSc library using specified directory and architecture. This command is used after the configuration step. ```bash make PETSC_DIR=c/cygdrive/c/software/petsc-git PETSC_ARCH=arch-mswin-c-debug all ``` -------------------------------- ### Visual Studio Fortran Compiler Settings Source: https://github.com/miracloon/pflotran-documentation/blob/master/source/user_guide/how_to/installation/windows_visual_studio.rst Specifies the necessary settings for the Fortran compiler within Visual Studio for PFLOTRAN development. These settings include preprocessor definitions, include paths, and runtime library configurations. ```fortran Preprocessor | Preprocess source files | Yes General | Additional included libraries | General | Preprocessor definitions | Code generation | Enable recursive routines | Yes General | Compile time diagnostics | Disable all Run-time | Check stack frame | No Libraries | Runtime library | Debug multithreaded Additional options: /check:noarg_temp_created ```