Skip to content

Commit

Permalink
This is a combination of 40 commits. The oldest message is at the top…
Browse files Browse the repository at this point in the history
…, the newest message is down the bottom.

ModelGeochemicalDatabase records swap matrix in order to translate bulk compositions back to original basis.  This swap matrix is updated every time a swap is performed by the GeochemistrySpeciesSwapper.  GeochemicalSystem has a method for getting the bulk in the original basis.

ModelGeochemicalDatabase has boolean vectors (basis_species_transported, eqm_species_transported and kin_species_transported) that define whether the species is involved in the transport side of reactive-transport.  GeochemistrySpeciesSwapper swaps these appropriate upon swapping

GeochemicalSystem has methods for computing the bulk-composition mole number of transporting species, both in the current basis and the original basis, based on the current values of molalities

Refs idaholab#15693

GeochemicalSolver now does not get instantiated with a GeochemicalSystem or a ModelGeochemicalDatabase.  Instead all of its methods have the GeochemicalSystem as an argument.  This is so a spatially-varying simulation can have just one GeochemicalSolver that solves the systems at all nodes.  Refs idaholab#15693

PertinentGeochemicalSystem now offers the method getIndexOfOriginalBasisSpecies that will be used when retrieving certain information expressed in the original basis

GeochemicalSystem now has a copy-assignment operator that is used in the threadJoin of the Reactors

GeochemicalModelDefinition now provides a const reference to the underlying PertinentGeochemicalSystem.  This is used in the GeochemistryAux to get various things about the original basis species

GeochemicalSystem.h GeochemistryActivityCoefficients.h GeochemistryActivityCoefficientsDebyeHuckel.h GeochemistryIonicStrength.h GeochemistryKineticRateCalculator.h GeochemistrySpeciesSwapper.h PertinentGeochemicalSystem.h now have comparitors in them for testing equality

NearestNodeNumber postprocessor added.  Refs idaholab#15749

NearestNodeNumber postprocessor and userobject added.  Refs  idaholab#15749

asdf

GeochemistryConsoleOutput now uses the NearestNodeNumber UserObject instead of a point

tests updated to reflect that GeochemistryConsoleOutput now uses NearestNodeNumber UserObject

doc updated regarding GeochemistryConsoleOutput using NearestNodeNumber UserObject

Actions and Reactor UserObjects now do not have getters regarding the point used for output purposes - only the node id is now used.  Also, some enhancements getting ready for spatial dependence

GeochemistyQuantityAux can now extract transported_moles_in_original_basis - useful for reactive transport

spatially-dependent Reactor classes added.  Refs idaholab#15693

doco added for spatial dependent sims.  Fixes idaholab#15693

overall kinetic mole_additions now allowed in GeochemicalSolver::solveSystem.  This is because these species may be transported in reactive transport and should not be added as basis species, but as kinetic species

mole_additions input to the solver can now include additions of kinetic species so that an external agent can pump kinetic species into the system.

transported mole numbers do not include kinetic species - including them was a mistake because that would mean transport short-circuits any kinetic rates, oh dear.  transporting kinetic species is easy now - just evaluate the kinetic moles and transport them

reorder temperature-setting before flushing in GeochemistryTimeDependentReactor.  This makes it easier to flush with different-temperature fluids.  Also, changes in kinetic-nonminerals in flush.  I think the previous implementation was incorrect, but the Bethke book doesn't actually specify what's supposed to happen for flushing kinetic-nonminerals.  This current implementation makes more sense to me than the previous one

2D GeoTES example added

heat-exchanger mode added to GeochemistryTimeDependentReactor, as well as some refactoring of its code.  Fixes idaholab#15768

Actions now have inputs that allow the UserObjects to be block or boundary restrictable.  Fixes idaholab#15769

Actions also have a flag that allows a usual moose solve involving Variables and Kernels to proceed.  It defaults to False.  Fixes idaholab#15770

PorousFlow DiracKernels now have a coupledVar that multiplies their fluxes.  Fixes idaholab#15771

PertinentGeochemicalSystem has a method originalBasisNames so that GeochemistryConsoleOutput can output the bulk composition in the original basis, which i feel might be useful.

Also:

RobPod weber-tensleep geotes example

moved geotes_2D example to combined and golded some tests

computational_efficiencies.md started

Start of Forge simulation

GeochemistrySpatialReactor bug with intel compilers fixed - cannot use size of map while inserting into map

forge equilibrium system

ability to use all relevant minerals in geochemical models.  Refs idaholab#15798

kinetic.i changed

forge water chemistry by Stuart suggestions

forge input files and doco

better mesh creation in weber_Tensleep example

forge porous_flow input file test and doco and pics

forge aquifer geochemistry input file and tests

compute efficiencies completed

Ability for GeochemistrySpatialReactor to adaptively change the timestep node-by-node in the case of solver failures.  Refs idaholab#15816

remarks on compute efficiencies of fieldsplit method

Reorganize the initialization list in GeochemistrySpatialReactor so that the swaps are implemented in the correct order, ooops

Slightly modify the input Quartz mole number in weber-tensleep so that the porosity is 0.1 not 0.099947
3D pics added to weber-tensleep example

utilize NodalVoidVolume UserObject in examples, now that it is merged.

trying to eliminate CIVET errors

removed png files
  • Loading branch information
WilkAndy authored and jain651 committed Apr 19, 2021
1 parent c3e6ce8 commit 4659263
Show file tree
Hide file tree
Showing 166 changed files with 15,975 additions and 501 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!/usr/bin/env python3
#* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html


import os
import sys
import matplotlib.pyplot as plt
import numpy as np

# Plotting the results of multiple runs of FORGE aquifer_geochemistry.i with 15251 nodes and no exodus output

cpus = np.array([1, 1, 1, 2, 2, 2, 4, 4, 4, 6, 6, 6, 8, 8, 8, 10, 10, 10, 16, 16, 16, 20, 20, 20, 20])
times = np.array([2001, 2000, 2000, 1010, 1011, 1010, 534, 533, 531, 387, 409, 399, 298, 313, 317, 233, 236, 241, 156, 157, 158, 144, 135, 132, 132])

logcp = np.log(cpus)
logt = np.log(times)
m, c = np.polyfit(logcp, logt, 1)
tfit = np.exp(m * logcp + c)
strm = '%s' % float('%.2g' % m)

plt.figure(0)
plt.loglog(cpus, times, 'k.', markersize = 8.0)
plt.loglog([1, 20], [2000, 2000.0 / 20.0], label = 'Perfect scaling')
plt.loglog(cpus, tfit, 'o--', markersize = 0.0, label = 'Actual scaling: time $\propto$ CPUs^' + strm)
plt.legend()
plt.ylabel("CPU time (s)")
plt.xlabel("Number of CPUs")
plt.title("Scaling of pure a geochemistry simulation")
plt.tight_layout()
plt.savefig("../../../../geochemistry/doc/content/media/geochemistry/geochem_scaling.png")


# Plotting the results of multiple runs of FORGE porous_flow.i with 180851 nodes and 100 timesteps with hypre and boomeramg

cpus = np.array([10, 20, 40, 60, 80, 100, 140, 200])
times = np.array([6253, 3310, 2028, 1216, 960, 830, 606, 470])
logcp = np.log(cpus)
logt = np.log(times)
m, c = np.polyfit(logcp, logt, 1)
tfit = np.exp(m * logcp + c)
strm = '%s' % float('%.2g' % m)
plt.figure(1)
plt.loglog(cpus, times, 'k.', markersize = 8.0)
plt.loglog([10, 200], [6253, 6253 * 10.0 / 200.0], label = 'Perfect scaling from 10 CPUs')
plt.loglog(cpus, tfit, 'o--', markersize = 0.0, label = 'Actual scaling: time $\propto$ CPUs^' + strm)
plt.legend()
plt.ylabel("CPU time (s)")
plt.xlabel("Number of CPUs")
plt.title("Scaling in a reactive-transport simulation")
plt.tight_layout()
plt.savefig("../../../../geochemistry/doc/content/media/geochemistry/reactive_transport_scaling.png")

plt.show()
sys.exit(0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
time,cm3_Albite,cm3_Anhydrite,cm3_Anorthite,cm3_Calcite,cm3_Chalcedony,cm3_Clinochl-7A,cm3_Illite,cm3_K-feldspar,cm3_Kaolinite,cm3_Laumontite,cm3_Paragonite,cm3_Phlogopite,cm3_Quartz,cm3_Zoisite,cm3_mineral,massfrac_Al,massfrac_Ca,massfrac_Cl,massfrac_H,massfrac_H2O,massfrac_HCO3,massfrac_K,massfrac_Mg,massfrac_Na,massfrac_SO4,massfrac_SiO2,pH,porosity,solution_temperature,temperature
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
100,43270.999045441,0.018382840431665,4667.9571628133,0.015640924964338,99.999996766225,99.999368829352,1865.3041023774,29231.762851642,99.999999999182,100.00000121564,99.999999992116,1848.5884501482,17515.351583228,100.00200037434,98999.998586592,4.4570449688601e-08,0.00058187764708002,0.0047443097831747,8.201489721315e-07,0.99182338925152,5.9062704903097e-05,0.00023054895054109,1.5395119212664e-07,0.0022810941411157,9.5166508847027e-06,0.00026918220017089,6.1827930179113,0.010000000141341,220,220
200,43270.997226917,0.018383168264859,4667.9561570081,0.015641501752949,99.999993590833,99.998989676449,1865.3041019395,29231.762843459,99.999999998401,100.00000240514,99.999999984084,1848.5884754705,17515.351613708,100.0038951993,98999.997324027,3.3037606506924e-08,0.00058108924098365,0.0047442983835755,8.1305628681898e-07,0.99182115084364,5.9061479171193e-05,0.00023054898504287,5.0892720932355e-07,0.0022815058688383,9.5070774267568e-06,0.00027148310022022,6.1803625327975,0.010000000267597,220,220
300,43270.995482059,0.018376445645148,4667.9551436988,0.015641558522769,99.999990469526,99.998770791728,1865.3041015279,29231.762835602,99.99999999763,100.0000036118,99.999999976398,1848.5885068096,17515.351658008,100.00569150803,98999.996202064,3.2335915095056e-08,0.00058038039419366,0.0047442884853152,8.1373361687649e-07,0.99181907650469,5.9060411309943e-05,0.00023054493309905,7.1265558688226e-07,0.0022819152168063,9.5063781207464e-06,0.00027366895134837,6.1633863251307,0.010000000379794,220,220
400,43270.993841092,0.018363716368822,4667.9541378761,0.015641021993764,99.999987397804,99.998602619345,1865.3041011492,29231.762828206,99.999999996871,100.00000485829,99.999999969291,1848.5885385096,17515.351714975,100.00741122318,98999.995172611,3.2132077564085e-08,0.00057973867775582,0.0047442799878221,8.1989872544537e-07,0.9918171972765,5.9060212562619e-05,0.00023053927082718,8.2219923409895e-07,0.0022823084617877,9.5202939459822e-06,0.00027568158876048,6.1422982612555,0.010000000482739,220,220
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
time,cm3_Albite,cm3_Anhydrite,cm3_Anorthite,cm3_Calcite,cm3_Chalcedony,cm3_Clinochl-7A,cm3_Illite,cm3_K-feldspar,cm3_Kaolinite,cm3_Paragonite,cm3_Phlogopite,cm3_Quartz,cm3_mineral
0,0,0,0,0,0,0,0,0,0,0,0,0,0
100000000,43542.245259927,0.018378251101435,4697.2192402987,0.015640261685623,2.1964341818424e-09,2.6665243797526e-09,1.3891630436578e-08,29415.002235822,9.9519333165842e-09,1.3252999999734e-08,3720.3526445133,17625.146594673,98999.999993789
200000000,43542.245259927,0.01837825109878,4697.2192402998,0.015640261274955,2.1263765493507e-09,3.3618686845359e-10,1.3889261277305e-08,29415.00223582,9.9518666336154e-09,1.3252999999489e-08,3720.352644516,17625.146594674,98999.999993789
300000000,43542.245259927,0.018378251098424,4697.2192403,0.015640261218833,2.058553480458e-09,4.2385365526264e-11,1.3886892522085e-08,29415.00223582,9.9517999510935e-09,1.3252999999247e-08,3720.3526445164,17625.146594674,98999.999993789
400000000,43542.245259927,0.018378251098424,4697.2192403,0.015640261218833,2.058553480458e-09,4.2385365526264e-11,1.3886892522085e-08,29415.00223582,9.9517999510935e-09,1.3252999999247e-08,3720.3526445164,17625.146594674,98999.999993789
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
time,cm3_Albite,cm3_Anhydrite,cm3_Anorthite,cm3_Calcite,cm3_Chalcedony,cm3_Clinochl-7A,cm3_Illite,cm3_K-feldspar,cm3_Kaolinite,cm3_Laumontite,cm3_Paragonite,cm3_Phlogopite,cm3_Quartz,cm3_Zoisite,cm3_mineral,kg_solvent_H2O,pH
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
100,43270.999045441,0.018382840431665,4667.9571628133,0.015640924964338,99.999996766225,99.999368829352,1865.3041023774,29231.762851642,99.999999999182,100.00000121564,99.999999992116,1848.5884501482,17515.351583228,100.00200037434,98999.998586592,1.0006384067589,6.1827930179113
200,43270.997226917,0.018383168264859,4667.9561570081,0.015641501752949,99.999993590833,99.998989676449,1865.3041019395,29231.762843459,99.999999998401,100.00000240514,99.999999984084,1848.5884754705,17515.351613708,100.0038951993,98999.997324027,1.0006384125569,6.1803625327975
300,43270.995482059,0.018376445645148,4667.9551436988,0.015641558522769,99.999990469526,99.998770791728,1865.3041015279,29231.762835602,99.99999999763,100.0000036118,99.999999976398,1848.5885068096,17515.351658008,100.00569150803,98999.996202064,1.0006384166992,6.1633863251307
400,43270.993841092,0.018363716368822,4667.9541378761,0.015641021993764,99.999987397804,99.998602619345,1865.3041011492,29231.762828206,99.999999996871,100.00000485829,99.999999969291,1848.5885385096,17515.351714975,100.00741122318,98999.995172611,1.0006384191193,6.1422982612555

0 comments on commit 4659263

Please sign in to comment.