From a82a07dccee0b0d96aab79a770d1178be3c2f4bb Mon Sep 17 00:00:00 2001 From: Mike Owen Date: Mon, 13 May 2024 13:26:23 -0700 Subject: [PATCH 1/5] Fixing an erroneous range check in Palpha porosity that was supposed to be deleted --- src/Porosity/PalphaPorosity.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Porosity/PalphaPorosity.cc b/src/Porosity/PalphaPorosity.cc index c4a3e6d55..99f3736d4 100644 --- a/src/Porosity/PalphaPorosity.cc +++ b/src/Porosity/PalphaPorosity.cc @@ -109,9 +109,6 @@ PalphaPorosity(const SolidNodeList& nodeList, for (auto i = 0u; i < n; ++i) { mc0[i] = c0[i]; } - const auto alpha0_min = mAlpha0.min(); - VERIFY2((1.0 <= mAlphae) and (mAlphae <= mAlphat) and (mAlphat <= alpha0_min), - "PalphaPorosity input ERROR : require 1.0 <= alphae <= alphat <= alpha0, (alphae, alphat, alpha0) = " << mAlphae << ", " << mAlphat << ", " << alpha0_min); } } From 81990701d610f12d59c1caf7cd37359609bfde8b Mon Sep 17 00:00:00 2001 From: Mike Owen Date: Wed, 15 May 2024 10:45:25 -0700 Subject: [PATCH 2/5] Fixed a terrible bug that was causing standard ASPH hydros (not FSI or CRK) to be incorrect with non-unit aspect ratio H tensors. Not the purpose of this branch, but we want this fix in develop ASAP so it will come along. --- RELEASE_NOTES.md | 3 +++ src/SPH/SPHHydroBase.cc | 11 ++++++----- src/SPH/SPHHydroBaseRZ.cc | 11 ++++++----- src/SPH/SolidSPHHydroBase.cc | 15 ++++++++------- src/SPH/SolidSPHHydroBaseRZ.cc | 15 ++++++++------- .../functional/Hydro/Noh/Noh-cylindrical-2d.py | 17 ++++++++++++++++- 6 files changed, 47 insertions(+), 25 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index f853ab37c..22b432e8d 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -11,6 +11,9 @@ Notable changes include: * tpl-manager.py will no longer use generic x86_64 configs for non LC systems. Users will be required to supply their own configs for pointing spack at external packages. * Bug Fixes / improvements: + * Corrected an erroneous VERIFY in the P-alpha porosity constructor (with Fields of porosity and sound speed) that forced runs to stop even with correct input parameters + * Fixed a bug in the standard ASPH hydros (ASPH, SolidASPH, and RZ varieties) that gave incorrect results. FSI ad CRK models with ASPH smoothing scales were OK, but standard + SPH using ASPH smoothing scales were simply incorrect for non-unit aspect ratio H's. Also added ATS tests to help catch such errors going forward. Version v2024.01.1 -- Release date 2024-02-17 ============================================== diff --git a/src/SPH/SPHHydroBase.cc b/src/SPH/SPHHydroBase.cc index 13e0c3e6f..0a9c5f6a2 100644 --- a/src/SPH/SPHHydroBase.cc +++ b/src/SPH/SPHHydroBase.cc @@ -843,15 +843,16 @@ evaluateDerivatives(const typename Dimension::Scalar time, const auto etaj = Hj*rij; const auto etaMagi = etai.magnitude(); const auto etaMagj = etaj.magnitude(); - const auto etaUnit = etai*safeInvVar(etaMagi); + const auto etaiUnit = etai*safeInvVar(etaMagi); + const auto etajUnit = etaj*safeInvVar(etaMagj); CHECK(etaMagi >= 0.0); CHECK(etaMagj >= 0.0); // Symmetrized kernel weight and gradient. W.kernelAndGradValue(etaMagi, Hdeti, Wi, gWi); W.kernelAndGradValue(etaMagj, Hdetj, Wj, gWj); - gradWi = gWi*Hi*etaUnit; - gradWj = gWj*Hj*etaUnit; + gradWi = gWi*Hi*etaiUnit; + gradWj = gWj*Hj*etajUnit; if (oneKernel) { WQi = Wi; WQj = Wj; @@ -860,8 +861,8 @@ evaluateDerivatives(const typename Dimension::Scalar time, } else { WQ.kernelAndGradValue(etaMagi, Hdeti, WQi, gWQi); WQ.kernelAndGradValue(etaMagj, Hdetj, WQj, gWQj); - gradWQi = gWQi*Hi*etaUnit; - gradWQj = gWQj*Hj*etaUnit; + gradWQi = gWQi*Hi*etaiUnit; + gradWQj = gWQj*Hj*etajUnit; } // Zero'th and second moment of the node distribution -- used for the diff --git a/src/SPH/SPHHydroBaseRZ.cc b/src/SPH/SPHHydroBaseRZ.cc index c9789551b..59dc54262 100644 --- a/src/SPH/SPHHydroBaseRZ.cc +++ b/src/SPH/SPHHydroBaseRZ.cc @@ -392,15 +392,16 @@ evaluateDerivatives(const Dim<2>::Scalar /*time*/, const auto etaj = Hj*xij; const auto etaMagi = etai.magnitude(); const auto etaMagj = etaj.magnitude(); - const auto etaUnit = etai*safeInvVar(etaMagi); + const auto etaiUnit = etai*safeInvVar(etaMagi); + const auto etajUnit = etaj*safeInvVar(etaMagj); CHECK(etaMagi >= 0.0); CHECK(etaMagj >= 0.0); // Symmetrized kernel weight and gradient. W.kernelAndGradValue(etaMagi, Hdeti, Wi, gWi); W.kernelAndGradValue(etaMagj, Hdetj, Wj, gWj); - gradWi = gWi*Hi*etaUnit; - gradWj = gWj*Hj*etaUnit; + gradWi = gWi*Hi*etaiUnit; + gradWj = gWj*Hj*etajUnit; if (oneKernel) { WQi = Wi; WQj = Wj; @@ -409,8 +410,8 @@ evaluateDerivatives(const Dim<2>::Scalar /*time*/, } else { WQ.kernelAndGradValue(etaMagi, Hdeti, WQi, gWQi); WQ.kernelAndGradValue(etaMagj, Hdetj, WQj, gWQj); - gradWQi = gWQi*Hi*etaUnit; - gradWQj = gWQj*Hj*etaUnit; + gradWQi = gWQi*Hi*etaiUnit; + gradWQj = gWQj*Hj*etajUnit; } // Zero'th and second moment of the node distribution -- used for the diff --git a/src/SPH/SolidSPHHydroBase.cc b/src/SPH/SolidSPHHydroBase.cc index 72a1164cc..2295f311a 100644 --- a/src/SPH/SolidSPHHydroBase.cc +++ b/src/SPH/SolidSPHHydroBase.cc @@ -548,15 +548,16 @@ evaluateDerivatives(const typename Dimension::Scalar /*time*/, const auto etaj = Hj*rij; const auto etaMagi = etai.magnitude(); const auto etaMagj = etaj.magnitude(); - const auto etaUnit = etai*safeInvVar(etaMagi); + const auto etaiUnit = etai*safeInvVar(etaMagi); + const auto etajUnit = etaj*safeInvVar(etaMagj); CHECK(etaMagi >= 0.0); CHECK(etaMagj >= 0.0); // Symmetrized kernel weight and gradient. W.kernelAndGradValue(etaMagi, Hdeti, Wi, gWi); W.kernelAndGradValue(etaMagj, Hdetj, Wj, gWj); - gradWi = gWi*Hi*etaUnit; - gradWj = gWj*Hj*etaUnit; + gradWi = gWi*Hi*etaiUnit; + gradWj = gWj*Hj*etajUnit; if (oneKernelQ) { WQi = Wi; WQj = Wj; @@ -565,15 +566,15 @@ evaluateDerivatives(const typename Dimension::Scalar /*time*/, } else { WQ.kernelAndGradValue(etaMagi, Hdeti, WQi, gWQi); WQ.kernelAndGradValue(etaMagj, Hdetj, WQj, gWQj); - gradWQi = gWQi*Hi*etaUnit; - gradWQj = gWQj*Hj*etaUnit; + gradWQi = gWQi*Hi*etaiUnit; + gradWQj = gWQj*Hj*etajUnit; } if (oneKernelG) { gradWGi = gradWi; gradWGj = gradWj; } else { - gradWGi = Hi*etaUnit * WG.gradValue(etaMagi, Hdeti); - gradWGj = Hj*etaUnit * WG.gradValue(etaMagj, Hdetj); + gradWGi = Hi*etaiUnit * WG.gradValue(etaMagi, Hdeti); + gradWGj = Hj*etajUnit * WG.gradValue(etaMagj, Hdetj); } // Zero'th and second moment of the node distribution -- used for the diff --git a/src/SPH/SolidSPHHydroBaseRZ.cc b/src/SPH/SolidSPHHydroBaseRZ.cc index f03222aad..3757aa5a2 100644 --- a/src/SPH/SolidSPHHydroBaseRZ.cc +++ b/src/SPH/SolidSPHHydroBaseRZ.cc @@ -469,15 +469,16 @@ evaluateDerivatives(const Dim<2>::Scalar /*time*/, const auto etaj = Hj*xij; const auto etaMagi = etai.magnitude(); const auto etaMagj = etaj.magnitude(); - const auto etaUnit = etai*safeInvVar(etaMagi); + const auto etaiUnit = etai*safeInvVar(etaMagi); + const auto etajUnit = etaj*safeInvVar(etaMagj); CHECK(etaMagi >= 0.0); CHECK(etaMagj >= 0.0); // Symmetrized kernel weight and gradient. W.kernelAndGradValue(etaMagi, Hdeti, Wi, gWi); W.kernelAndGradValue(etaMagj, Hdetj, Wj, gWj); - gradWi = gWi*Hi*etaUnit; - gradWj = gWj*Hj*etaUnit; + gradWi = gWi*Hi*etaiUnit; + gradWj = gWj*Hj*etajUnit; if (oneKernelQ) { WQi = Wi; WQj = Wj; @@ -486,15 +487,15 @@ evaluateDerivatives(const Dim<2>::Scalar /*time*/, } else { WQ.kernelAndGradValue(etaMagi, Hdeti, WQi, gWQi); WQ.kernelAndGradValue(etaMagj, Hdetj, WQj, gWQj); - gradWQi = gWQi*Hi*etaUnit; - gradWQj = gWQj*Hj*etaUnit; + gradWQi = gWQi*Hi*etaiUnit; + gradWQj = gWQj*Hj*etajUnit; } if (oneKernelG) { gradWGi = gradWi; gradWGj = gradWj; } else { - gradWGi = Hi*etaUnit * WG.gradValue(etaMagi, Hdeti); - gradWGj = Hj*etaUnit * WG.gradValue(etaMagj, Hdetj); + gradWGi = Hi*etaiUnit * WG.gradValue(etaMagi, Hdeti); + gradWGj = Hj*etajUnit * WG.gradValue(etaMagj, Hdetj); } // Determine how we're applying damage. diff --git a/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py b/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py index 636f4332d..f25e3afe8 100644 --- a/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py +++ b/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py @@ -4,6 +4,11 @@ #ATS:sph0 = test( SELF, "--crksph False --nRadial 100 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical SPH, nPerh=2.0", np=8) #ATS:sph1 = testif(sph0, SELF, "--crksph False --nRadial 100 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --clearDirectories False --steps 60 --restoreCycle 40 --checkRestart True", label="Noh cylindrical SPH, nPerh=2.0, restart test", np=8) # +# ASPH +# +#ATS:asph0 = test( SELF, "--crksph False --asph True --nRadial 100 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical ASPH, nPerh=2.0", np=8) +#ATS:asph1 = testif(sph0, SELF, "--crksph False --asph True --nRadial 100 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --clearDirectories False --steps 60 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ASPH, nPerh=2.0, restart test", np=8) +# # CRK (SumVolume) # #ATS:crk0 = test( SELF, "--crksph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories True --steps 50", label="Noh cylindrical CRK (sum vol), nPerh=2.0", np=2) @@ -14,6 +19,16 @@ #ATS:crk2 = test( SELF, "--crksph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories True --steps 50", label="Noh cylindrical CRK (Voronoi vol), nPerh=2.0", np=2) #ATS:crk3 = testif(crk2, SELF, "--crksph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical CRK (Voronoi vol) , nPerh=2.0, restart test", np=2) # +# ACRK (SumVolume) +# +#ATS:acrk0 = test( SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories True --steps 50", label="Noh cylindrical ACRK (sum vol), nPerh=2.0", np=2) +#ATS:acrk1 = testif(crk0, SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ACRK (sum vol), nPerh=2.0, restart test", np=2) +# +# ACRK (VoroniVolume) +# +#ATS:acrk2 = test( SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories True --steps 50", label="Noh cylindrical ACRK (Voronoi vol), nPerh=2.0", np=2) +#ATS:acrk3 = testif(crk2, SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ACRK (Voronoi vol) , nPerh=2.0, restart test", np=2) +# # GSPH # #ATS:gsph0 = test( SELF, "--gsph True --nRadial 100 --cfl 0.25 --nPerh 2.01 --graphics False --restartStep 20 --clearDirectories True --steps 100", label="Noh cylindrical GSPH, nPerh=2.0", np=8) @@ -507,7 +522,7 @@ vizTime = vizTime, vizDerivs = vizDerivs, #skipInitialPeriodicWork = SVPH, - SPH = True, # Only for iterating H + SPH = not asph, # Only for iterating H ) output("control") From b53b1abc625f632b4022b0492c2d3498218a3d5b Mon Sep 17 00:00:00 2001 From: Mike Owen Date: Wed, 15 May 2024 13:06:53 -0700 Subject: [PATCH 3/5] Adding optional user specified smoothing scale method for SPH, FSISPH, and CRKSPH --- RELEASE_NOTES.md | 1 + src/CRKSPH/CRKSPHHydros.py | 21 ++++++------- src/FSISPH/FSISPHHydros.py | 63 ++++++++++++++++++++------------------ src/SPH/SPHHydros.py | 18 +++++------ 4 files changed, 51 insertions(+), 52 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 22b432e8d..34005d391 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,6 +6,7 @@ Version vYYYY.MM.p -- Release date YYYY-MM-DD Notable changes include: * New features/ API changes: + * Adding optional user specified smoothing scale method for SPH, FSISPH, and CRKSPH * Build changes / improvements: * tpl-manager.py will no longer use generic x86_64 configs for non LC systems. Users will be required to supply their own configs for pointing spack at external packages. diff --git a/src/CRKSPH/CRKSPHHydros.py b/src/CRKSPH/CRKSPHHydros.py index 8e398606f..a0647274b 100644 --- a/src/CRKSPH/CRKSPHHydros.py +++ b/src/CRKSPH/CRKSPHHydros.py @@ -22,7 +22,8 @@ def CRKSPH(dataBase, damageRelieveRubble = False, ASPH = False, etaMinAxis = 0.1, - crktype = "default"): + crktype = "default", + smoothingScaleMethod = None): # We use the provided DataBase to sniff out what sort of NodeLists are being # used, and based on this determine which SPH object to build. @@ -62,10 +63,11 @@ def CRKSPH(dataBase, Q = eval("LimitedMonaghanGingoldViscosity%id(Clinear=%g, Cquadratic=%g)" % (ndim, Cl, Cq)) # Smoothing scale update - if ASPH: - smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) - else: - smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) + if smoothingScaleMethod is None: + if ASPH: + smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) + else: + smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) # Build the constructor arguments kwargs = {"smoothingScaleMethod" : smoothingScaleMethod, @@ -86,16 +88,13 @@ def CRKSPH(dataBase, if nsolid > 0: kwargs.update({"damageRelieveRubble" : damageRelieveRubble}) + if GeometryRegistrar.coords() == CoordinateType.RZ: + kwargs.update({"etaMinAxis" : etaMinAxis}) + # Build the thing. result = constructor(**kwargs) result.Q = Q result._smoothingScaleMethod = smoothingScaleMethod - - # If we're using area-weighted RZ, we need to reflect from the axis - if GeometryRegistrar.coords() == CoordinateType.RZ: - result.zaxisBC = AxisBoundaryRZ(etaMinAxis) - result.appendBoundary(result.zaxisBC) - return result #------------------------------------------------------------------------------- diff --git a/src/FSISPH/FSISPHHydros.py b/src/FSISPH/FSISPHHydros.py index 4a6ca1db5..044dacef6 100644 --- a/src/FSISPH/FSISPHHydros.py +++ b/src/FSISPH/FSISPHHydros.py @@ -4,32 +4,34 @@ dims = spheralDimensions() def FSISPH(dataBase, - W, - Q = None, - slides=None, - cfl = 0.35, - surfaceForceCoefficient=0.0, - densityStabilizationCoefficient=0.1, - specificThermalEnergyDiffusionCoefficient=0.1, - xsphCoefficient=0.0, - interfaceMethod=HLLCInterface, - kernelAveragingMethod = NeverAverageKernels, - sumDensityNodeLists=[], - useVelocityMagnitudeForDt = False, - compatibleEnergyEvolution = True, - evolveTotalEnergy = False, - linearCorrectGradients = True, - planeStrain = False, - interfacePmin = 0.0, - interfaceNeighborAngleThreshold=0.707, - HUpdate = IdealH, - densityUpdate = FSISumMassDensity, - epsTensile = 0.0, - nTensile = 4.0, - xmin = (-1e100, -1e100, -1e100), - xmax = ( 1e100, 1e100, 1e100), - ASPH = False, - RZ = False): + W, + Q = None, + slides=None, + cfl = 0.35, + surfaceForceCoefficient=0.0, + densityStabilizationCoefficient=0.1, + specificThermalEnergyDiffusionCoefficient=0.1, + xsphCoefficient=0.0, + interfaceMethod=HLLCInterface, + kernelAveragingMethod = NeverAverageKernels, + sumDensityNodeLists=[], + useVelocityMagnitudeForDt = False, + compatibleEnergyEvolution = True, + evolveTotalEnergy = False, + linearCorrectGradients = True, + planeStrain = False, + interfacePmin = 0.0, + interfaceNeighborAngleThreshold=0.707, + HUpdate = IdealH, + densityUpdate = FSISumMassDensity, + epsTensile = 0.0, + nTensile = 4.0, + xmin = (-1e100, -1e100, -1e100), + xmax = ( 1e100, 1e100, 1e100), + ASPH = False, + RZ = False, + smoothingScaleMethod = None): + ###################################################################### # some of these parameters are inactive and possible on there was out. # strengthInDamage and damageRelieveRubble are old switches and are not @@ -86,10 +88,11 @@ def FSISPH(dataBase, slides = eval("SlideSurface%id(dataBase,contactTypes)" % ndim) # Smoothing scale update - if ASPH: - smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) - else: - smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) + if smoothingScaleMethod is None: + if ASPH: + smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) + else: + smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) # Build the constructor arguments xmin = (ndim,) + xmin diff --git a/src/SPH/SPHHydros.py b/src/SPH/SPHHydros.py index 0a7a527cd..cfe8daa0c 100644 --- a/src/SPH/SPHHydros.py +++ b/src/SPH/SPHHydros.py @@ -29,7 +29,8 @@ def SPH(W, xmin = (-1e100, -1e100, -1e100), xmax = ( 1e100, 1e100, 1e100), etaMinAxis = 0.1, - ASPH = False): + ASPH = False, + smoothingScaleMethod = None): # Check if we're running solid or fluid hydro nfluid = dataBase.numFluidNodeLists @@ -86,16 +87,11 @@ def SPH(W, Q = eval("LimitedMonaghanGingoldViscosity%id(Clinear=%g, Cquadratic=%g)" % (ndim, Cl, Cq)) # Smoothing scale update - if ASPH: - smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) - else: - smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) - - # Smoothing scale update - if ASPH: - smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) - else: - smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) + if smoothingScaleMethod is None: + if ASPH: + smoothingScaleMethod = eval("ASPHSmoothingScale%id()" % ndim) + else: + smoothingScaleMethod = eval("SPHSmoothingScale%id()" % ndim) # Build the constructor arguments xmin = (ndim,) + xmin From c7e1360115f43223904f118fc00a46d55741d8a6 Mon Sep 17 00:00:00 2001 From: Mike Owen Date: Wed, 15 May 2024 16:17:14 -0700 Subject: [PATCH 4/5] RZ CRK fix --- src/CRKSPH/CRKSPHHydros.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/CRKSPH/CRKSPHHydros.py b/src/CRKSPH/CRKSPHHydros.py index a0647274b..b5ddd0569 100644 --- a/src/CRKSPH/CRKSPHHydros.py +++ b/src/CRKSPH/CRKSPHHydros.py @@ -88,13 +88,16 @@ def CRKSPH(dataBase, if nsolid > 0: kwargs.update({"damageRelieveRubble" : damageRelieveRubble}) - if GeometryRegistrar.coords() == CoordinateType.RZ: - kwargs.update({"etaMinAxis" : etaMinAxis}) - # Build the thing. result = constructor(**kwargs) result.Q = Q result._smoothingScaleMethod = smoothingScaleMethod + + # If we're using area-weighted RZ, we need to reflect from the axis + if GeometryRegistrar.coords() == CoordinateType.RZ: + result.zaxisBC = AxisBoundaryRZ(etaMinAxis) + result.appendBoundary(result.zaxisBC) + return result #------------------------------------------------------------------------------- From 69c5f2df62ad1d5a18f9ea1838af80a9eab7ad38 Mon Sep 17 00:00:00 2001 From: Mike Owen Date: Fri, 21 Jun 2024 14:23:37 -0700 Subject: [PATCH 5/5] Found the source for a race condition error in ACRK Noh test --- tests/functional/Hydro/Noh/Noh-cylindrical-2d.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py b/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py index b33750f6a..8be099298 100644 --- a/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py +++ b/tests/functional/Hydro/Noh/Noh-cylindrical-2d.py @@ -21,13 +21,13 @@ # # ACRK (SumVolume) # -#ATS:acrk0 = test( SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories True --steps 50", label="Noh cylindrical ACRK (sum vol), nPerh=2.0", np=2) -#ATS:acrk1 = testif(crk0, SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ACRK (sum vol), nPerh=2.0, restart test", np=2) +#ATS:acrk0 = test( SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories True --steps 50", label="Noh cylindrical ACRK (sum vol), nPerh=2.0", np=2) +#ATS:acrk1 = testif(acrk0, SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKSumVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ACRK (sum vol), nPerh=2.0, restart test", np=2) # # ACRK (VoroniVolume) # -#ATS:acrk2 = test( SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories True --steps 50", label="Noh cylindrical ACRK (Voronoi vol), nPerh=2.0", np=2) -#ATS:acrk3 = testif(crk2, SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ACRK (Voronoi vol) , nPerh=2.0, restart test", np=2) +#ATS:acrk2 = test( SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories True --steps 50", label="Noh cylindrical ACRK (Voronoi vol), nPerh=2.0", np=2) +#ATS:acrk3 = testif(acrk2, SELF, "--crksph True --asph True --nRadial 20 --cfl 0.25 --Cl 1.0 --Cq 1.0 --filter 0.0 --nPerh 2.01 --graphics False --restartStep 20 --volumeType RKVoronoiVolume --clearDirectories False --steps 10 --restoreCycle 40 --checkRestart True", label="Noh cylindrical ACRK (Voronoi vol) , nPerh=2.0, restart test", np=2) # # GSPH #