Skip to content

Commit c1bd7cb

Browse files
authored
Merge pull request #394 from LLNL/rc-v2025.06.1
v2025.06.1 Patch Release
2 parents 71c53f0 + 9f909d2 commit c1bd7cb

13 files changed

Lines changed: 149 additions & 155 deletions

RELEASE_NOTES.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
Version v2025.06.1 -- Release date 2025-07-21
2+
==============================================
3+
* Important Notes:
4+
* This is a patch release for v2025.06.0.
5+
6+
Notable changes include:
7+
8+
* Bug Fixes / improvements:
9+
* The porosity models now restart the full field of initial sound speeds, rather than assuming they are set during problem initialization every time.
10+
* Set limits on porosity contributions to damage while crushing out porosity.
11+
* Added better limits on ANEOS internal eps(rho, T) interpolation, which seems to have improved ANEOS stability.
12+
113
Version v2025.06.0 -- Release date 2025-06-18
214
==============================================
315
* Important Notes:

cmake/SpheralVersion.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
set(SPHERAL_VERSION 2025.06.0)
1+
set(SPHERAL_VERSION 2025.06.1)

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
author = 'J. Michael Owen'
2828

2929
# The short X.Y version
30-
version = '2025.06.0'
30+
version = '2025.06.1'
3131
# The full version, including alpha/beta/rc tags
32-
release = '2025.06.0'
32+
release = '2025.06.1'
3333

3434

3535
# -- General configuration ---------------------------------------------------

docs/developer/dev/continuous_deployment.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ to their environment.
99

1010
On LC systems we maintain:
1111
* ``Spheral/risky``
12-
* ``Spheral/2025.06.0``
12+
* ``Spheral/2025.06.1``
1313
* ``Spheral/2025.01.0``
1414
* ``Spheral/2024.06.1``
1515
* ``Spheral/2024.01.1``

src/Damage/ProbabilisticDamagePolicy.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ update(const KeyType& key,
279279
const auto alpha0 = (*alpha0Ptr)(i);
280280
const auto alpha = (*alphaPtr)(i);
281281
const auto DalphaDti = std::min(0.0, (*DalphaDtPtr)(i)); // Only allowed to grow damage, not reduce it.
282-
const auto phi0 = 1.0 - 1.0/alpha0;
283-
const auto DD13Dt_p = -FastMath::CubeRootHalley2(phi0)*safeInv(3.0 * pow(1.0 - (alpha - 1.0)*safeInv(alpha0 - 1.0) + Dtiny, 2.0/3.0) * (alpha0 - 1.0))*Dtiny1*DalphaDti;
284-
CHECK2(DD13Dt_p >= 0.0, "bad DD13Dt_p: " << DD13Dt_p);
285-
D113 = std::min(1.0, D113 + multiplier*DD13Dt_p);
282+
const auto phi0_13 = FastMath::CubeRootHalley2(1.0 - 1.0/alpha0);
283+
const auto DD13Dt_p = -phi0_13/(3.0 * pow(1.0 - (alpha - 1.0)*safeInv(alpha0 - 1.0) + Dtiny, 2.0/3.0) * (alpha0 - 1.0))*Dtiny1*DalphaDti;
284+
CHECK(DD13Dt_p >= 0.0);
285+
D113 = std::min(1.0, D113 + std::min(phi0_13, multiplier*DD13Dt_p));
286286
}
287287

288288
// Increment the damage tensor.

src/Damage/TensorDamagePolicy.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ update(const KeyType& key,
306306
const auto alpha0 = (*alpha0Ptr)(i);
307307
const auto alpha = (*alphaPtr)(i);
308308
const auto DalphaDti = std::min(0.0, (*DalphaDtPtr)(i)); // Only allowed to grow damage, not reduce it.
309-
const auto phi0 = 1.0 - 1.0/alpha0;
310-
const auto DD13Dt_p = -FastMath::CubeRootHalley2(phi0)/(3.0 * pow(1.0 - (alpha - 1.0)*safeInv(alpha0 - 1.0) + Dtiny, 2.0/3.0) * (alpha0 - 1.0))*Dtiny1*DalphaDti;
309+
const auto phi0_13 = FastMath::CubeRootHalley2(1.0 - 1.0/alpha0);
310+
const auto DD13Dt_p = -phi0_13/(3.0 * pow(1.0 - (alpha - 1.0)*safeInv(alpha0 - 1.0) + Dtiny, 2.0/3.0) * (alpha0 - 1.0))*Dtiny1*DalphaDti;
311311
CHECK(DD13Dt_p >= 0.0);
312-
D113 = std::min(1.0, D113 + multiplier*DD13Dt_p);
312+
D113 = std::min(1.0, D113 + std::min(phi0_13, multiplier*DD13Dt_p));
313313
}
314314

315315
// Increment the damage tensor.

src/Damage/TensorStrainPolicy.cc

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "Hydro/HydroFieldNames.hh"
1212
#include "DataBase/UpdatePolicyBase.hh"
1313
#include "DataBase/IncrementState.hh"
14+
#include "DataBase/IncrementBoundedState.hh"
1415
#include "DataBase/State.hh"
1516
#include "DataBase/StateDerivatives.hh"
1617
#include "Field/Field.hh"
@@ -85,26 +86,35 @@ update(const KeyType& key,
8586

8687
// Check if a porosity model has registered a modifier for the deviatoric stress.
8788
// They should have added it as a dependency of this policy if so.
88-
const auto usePorosity = state.registered(buildKey(SolidFieldNames::fDSjutzi));
89+
const auto porosityScaling = state.registered(buildKey(SolidFieldNames::fDSjutzi));
8990
const Field<Dimension, Scalar>* fDSptr = nullptr;
90-
if (usePorosity) {
91+
const Field<Dimension, Scalar>* alphaPtr = nullptr;
92+
const Field<Dimension, Scalar>* DalphaDtPtr = nullptr;
93+
if (porosityScaling) {
9194
fDSptr = &state.field(buildKey(SolidFieldNames::fDSjutzi), 0.0);
95+
alphaPtr = &state.field(buildKey(SolidFieldNames::porosityAlpha), 0.0);
96+
DalphaDtPtr = &derivs.field(buildKey(IncrementBoundedState<Dimension, Scalar>::prefix() + SolidFieldNames::porosityAlpha), 0.0);
9297
}
9398

9499
// Iterate over the internal nodes.
95100
const auto ni = stateField.numInternalElements();
96101
#pragma omp parallel for
97102
for (auto i = 0u; i < ni; ++i) {
98-
const auto fDSi = (usePorosity ?
99-
(*fDSptr)(i) :
100-
1.0);
103+
double fDSi = 1.0;
101104

102105
// Begin the big bonanza of options!
103106

104107
// PseudoPlasticStrain.
105108
if (mStrainType == TensorStrainAlgorithm::PseudoPlasticStrain) {
106109

107-
const auto DSDti = fDSi * DSDt(i);
110+
auto DSDti = DSDt(i);
111+
if (porosityScaling) {
112+
fDSi = (*fDSptr)(i);
113+
const auto alphai = (*alphaPtr)(i);
114+
const auto DalphaDti = (*DalphaDtPtr)(i);
115+
CHECK(alphai >= 1.0);
116+
DSDti = (fDSi*DSDti - S(i)*DalphaDti/alphai)/alphai;
117+
}
108118
strain(i) += multiplier*safeInv(mu(i), 1.0e-10)*DSDti;
109119
stateField(i) = strain(i);
110120

@@ -127,7 +137,7 @@ update(const KeyType& key,
127137
switch(mStrainType) {
128138

129139
case(TensorStrainAlgorithm::BenzAsphaugStrain):
130-
CHECK(E(i) >= 0.0);
140+
CHECK2(E(i) >= 0.0, "Bad Youngs modulus for " << stateField.nodeList().name() << " " << i << " : " << E(i));
131141
stateField(i) = (S(i) - P(i)*SymTensor::one)/(E(i) + tiny);
132142
break;
133143

src/Porosity/PalphaPorosity.cc

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -158,50 +158,59 @@ evaluateDerivatives(const Scalar time,
158158
const auto DrhoDti = DrhoDt(i);
159159
const auto DuDti = DuDt(i);
160160

161-
// Time evolution of the solid pressure
162-
const auto dPsdti = dPsdri*DrhoDti + dPsdui*DuDti;
161+
// If fully compressed we're done
162+
if (alphai == 1.0) {
163163

164-
// If we're above the solid transition pressure we should compress out all porosity
165-
if (Pi >= mPs) {
166-
167-
DalphaDt(i) = (1.0 - alphai)*safeInvVar(dt);
164+
DalphaDt(i) = 0.0;
168165
fDSnew(i) = 1.0;
169166

170167
} else {
171168

172-
// First compute the derivative with respect to pressure
173-
auto DalphaDpi = 0.0;
174-
if (alphai > 1.0) {
175-
if (Pi < mPe or dPsdti < 0.0) {
169+
// Time evolution of the solid pressure
170+
const auto dPsdti = dPsdri*DrhoDti + dPsdui*DuDti;
176171

177-
// Elastic
178-
if (c0i != mcS0) { // If initial porous sound speed is the same as solid phase, no elastic evolution
179-
const auto halpha = 1.0 + (alphai - 1.0)*(c0i - mcS0)*safeInvVar(mcS0*(mAlphae - 1.0));
180-
DalphaDpi = alphai*alphai/mKS0*(1.0 - safeInvVar(halpha*halpha));
181-
}
172+
// If we're above the solid transition pressure we should compress out all porosity
173+
if (Pi >= mPs) {
182174

183-
} else {
175+
DalphaDt(i) = (1.0 - alphai)*safeInvVar(dt);
176+
fDSnew(i) = 1.0;
177+
178+
} else {
179+
180+
// First compute the derivative with respect to pressure
181+
auto DalphaDpi = 0.0;
182+
if (alphai > 1.0) {
183+
if (Pi < mPe or dPsdti < 0.0) {
184+
185+
// Elastic
186+
if (c0i != mcS0) { // If initial porous sound speed is the same as solid phase, no elastic evolution
187+
const auto halpha = 1.0 + (alphai - 1.0)*(c0i - mcS0)*safeInvVar(mcS0*(mAlphae - 1.0));
188+
DalphaDpi = alphai*alphai/mKS0*(1.0 - safeInvVar(halpha*halpha));
189+
}
184190

185-
// Plastic
186-
DalphaDpi = (Pi < mPt ?
187-
mn1*(mAlphat - mAlphae)*pow((mPt - Pi)/(mPt - mPe), mn1)*safeInv(mPt - Pi) + mn2*(1.0 - mAlphat)*pow((mPs - Pi)/(mPs - mPe), mn2)*safeInv(mPs - Pi) :
188-
mn2*(1.0 - mAlphat)*pow((mPs - Pi)/(mPs - mPe), mn2)*safeInv(mPs - Pi));
191+
} else {
189192

193+
// Plastic
194+
DalphaDpi = (Pi < mPt ?
195+
mn1*(mAlphat - mAlphae)*pow((mPt - Pi)/(mPt - mPe), mn1)*safeInv(mPt - Pi) + mn2*(1.0 - mAlphat)*pow((mPs - Pi)/(mPs - mPe), mn2)*safeInv(mPs - Pi) :
196+
mn2*(1.0 - mAlphat)*pow((mPs - Pi)/(mPs - mPe), mn2)*safeInv(mPs - Pi));
197+
198+
}
190199
}
191-
}
192200

193-
// Now we can compute the final time derivative
194-
DalphaDpi = min(0.0, DalphaDpi); // Keep things physical
195-
const auto Ainv = safeInvVar(alphai + DalphaDpi*(Pi - rhoi*dPsdri));
196-
const auto dPdti = (alphai*dPsdri*DrhoDti + dPsdui*DuDti)*Ainv;
197-
DalphaDt(i) = DalphaDpi*dPdti;
201+
// Now we can compute the final time derivative
202+
DalphaDpi = min(0.0, DalphaDpi); // Keep things physical
203+
const auto Ainv = safeInvVar(alphai + DalphaDpi*(Pi - rhoi*dPsdri));
204+
const auto dPdti = (alphai*dPsdri*DrhoDti + dPsdui*DuDti)*Ainv;
205+
DalphaDt(i) = DalphaDpi*dPdti;
198206

199-
// Optionally update the deviatoric stress scaling term
200-
if (mJutziStateUpdate) {
201-
auto DalphaDrhoi = (Pi/(rhoi*rhoi)*dPsdui + alphai*dPsdri)*Ainv * DalphaDpi;
202-
fDSnew(i) = std::max(0.0, std::min(1.0, 1.0 + DalphaDrhoi*rhoi/alphai));
203-
} else {
204-
fDSnew(i) = 1.0;
207+
// Optionally update the deviatoric stress scaling term
208+
if (mJutziStateUpdate) {
209+
auto DalphaDrhoi = (Pi/(rhoi*rhoi)*dPsdui + alphai*dPsdri)*Ainv * DalphaDpi;
210+
fDSnew(i) = std::max(0.0, std::min(1.0, 1.0 + DalphaDrhoi*rhoi/alphai));
211+
} else {
212+
fDSnew(i) = 1.0;
213+
}
205214
}
206215
}
207216

@@ -237,7 +246,6 @@ void
237246
PalphaPorosity<Dimension>::
238247
dumpState(FileIO& file, const string& pathName) const {
239248
PorosityModel<Dimension>::dumpState(file, pathName);
240-
file.write(mc0, pathName + "/c0");
241249
file.write(mdPdU, pathName + "/dPdU");
242250
file.write(mdPdR, pathName + "/dPdR");
243251
}
@@ -250,7 +258,6 @@ void
250258
PalphaPorosity<Dimension>::
251259
restoreState(const FileIO& file, const string& pathName) {
252260
PorosityModel<Dimension>::restoreState(file, pathName);
253-
file.read(mc0, pathName + "/c0");
254261
file.read(mdPdU, pathName + "/dPdU");
255262
file.read(mdPdR, pathName + "/dPdR");
256263
}

src/Porosity/PorosityModel.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "DataBase/IncrementState.hh"
1717
#include "DataBase/IncrementBoundedState.hh"
1818
#include "DataBase/PureReplaceBoundedState.hh"
19+
#include "Utilities/SpheralMessage.hh"
1920

2021
#include <string>
2122

@@ -282,6 +283,7 @@ dumpState(FileIO& file, const string& pathName) const {
282283
file.write(mAlpha, pathName + "/alpha");
283284
file.write(mDalphaDt, pathName + "/DalphaDt");
284285
file.write(mSolidMassDensity, pathName + "/solidMassDensity");
286+
file.write(mc0, pathName + "/c0");
285287
file.write(mfDS, pathName + "/fDS");
286288
file.write(mfDSnew, pathName + "/fDSnew");
287289
}
@@ -298,6 +300,7 @@ restoreState(const FileIO& file, const string& pathName) {
298300
file.read(mAlpha, pathName + "/alpha");
299301
file.read(mDalphaDt, pathName + "/DalphaDt");
300302
file.read(mSolidMassDensity, pathName + "/solidMassDensity");
303+
if (file.readIfAvailable(mc0, pathName + "/c0") != 0) SpheralMessage("PorosityModel WARNING: unable to load variable c0");
301304
file.read(mfDS, pathName + "/fDS");
302305
file.read(mfDSnew, pathName + "/fDSnew");
303306
}

src/Porosity/StrainPorosity.cc

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -124,45 +124,49 @@ evaluateDerivatives(const Scalar /*time*/,
124124
const auto n = mNodeList.numInternalNodes();
125125
#pragma omp parallel for
126126
for (auto i = 0u; i < n; ++i) {
127-
DstrainDt(i) = DvDx(i).Trace();
128127
const auto alphai = alpha(i);
129-
const auto epsi = strain(i);
130-
const auto DuDti = DuDt(i);
131-
const auto strainRate = min(0.0, DstrainDt(i) - mGammaS0*safeInv(mcS0*mcS0)*DuDti);
132-
const auto alpha0i = mAlpha0(i);
133-
const auto c0i = mc0(i);
134-
const auto csi = mcS0 + (alphai - 1.0)*safeInv(alpha0i - 1.0)*(c0i - mcS0);
135-
136-
// The time rate of change for alpha depends on if we're in the elastic, exponential, or
137-
// power-law regime of compaction.
138-
auto DalphaDepsi = 0.0;
139-
if (-std::abs(epsi) >= mEpsE) {
140-
// Elastic regime
141-
// We assume compaction is reversible in this regime.
142-
DalphaDepsi = alphai*(1.0 - FastMath::square(csi*safeInv(mcS0)));
143-
DalphaDt(i) = DalphaDepsi*strainRate;
144-
} else if (epsi < 0.0) { // The plastic regimes only apply for negative strains (compaction)
145-
if (epsi >= mEpsX) {
146-
// Exponential regime
147-
DalphaDepsi = mKappa*alphai;
148-
DalphaDt(i) = min(0.0, DalphaDepsi*strainRate);
149-
} else {
150-
// Power-law -- irreversible compaction.
151-
const auto epsCi = 2.0*(1.0 - alpha0i*exp(mKappa*(mEpsX - mEpsE)))/(mKappa*alpha0i*exp(mKappa*(mEpsX - mEpsE))) + mEpsX;
152-
const auto PLcoefi = 2.0*(1.0 - alpha0i*exp(mKappa*(mEpsX - mEpsE)))/FastMath::square(epsCi - mEpsX);
153-
DalphaDepsi = PLcoefi*(mEpsE - epsi);
154-
DalphaDt(i) = min(0.0, DalphaDepsi*strainRate);
128+
if (alphai == 1.0) {
129+
DstrainDt(i) = 0.0;
130+
DalphaDt(i) = 0.0;
131+
fDSnew(i) = 1.0;
132+
} else {
133+
DstrainDt(i) = DvDx(i).Trace();
134+
const auto epsi = strain(i);
135+
const auto DuDti = DuDt(i);
136+
const auto strainRate = min(0.0, DstrainDt(i) - mGammaS0*safeInv(mcS0*mcS0)*DuDti);
137+
const auto alpha0i = mAlpha0(i);
138+
const auto c0i = mc0(i);
139+
const auto csi = mcS0 + (alphai - 1.0)*safeInv(alpha0i - 1.0)*(c0i - mcS0);
140+
141+
// The time rate of change for alpha depends on if we're in the elastic, exponential, or
142+
// power-law regime of compaction.
143+
auto DalphaDepsi = 0.0;
144+
if (-std::abs(epsi) >= mEpsE) {
145+
// Elastic regime
146+
// We assume compaction is reversible in this regime.
147+
DalphaDepsi = alphai*(1.0 - FastMath::square(csi*safeInv(mcS0)));
148+
DalphaDt(i) = DalphaDepsi*strainRate;
149+
} else if (epsi < 0.0) { // The plastic regimes only apply for negative strains (compaction)
150+
if (epsi >= mEpsX) {
151+
// Exponential regime
152+
DalphaDepsi = mKappa*alphai;
153+
DalphaDt(i) = min(0.0, DalphaDepsi*strainRate);
154+
} else {
155+
// Power-law -- irreversible compaction.
156+
const auto epsCi = 2.0*(1.0 - alpha0i*exp(mKappa*(mEpsX - mEpsE)))/(mKappa*alpha0i*exp(mKappa*(mEpsX - mEpsE))) + mEpsX;
157+
const auto PLcoefi = 2.0*(1.0 - alpha0i*exp(mKappa*(mEpsX - mEpsE)))/FastMath::square(epsCi - mEpsX);
158+
DalphaDepsi = PLcoefi*(mEpsE - epsi);
159+
DalphaDt(i) = min(0.0, DalphaDepsi*strainRate);
160+
}
155161
}
156-
}
157162

158-
// Optionally update the deviatoric stress scaling term
159-
if (mJutziStateUpdate) {
160-
fDSnew(i) = (alphai == 1.0 ?
161-
1.0 :
162-
1.0 - DalphaDepsi/rhoS(i));
163-
// 1.0 + DalphaDt(i)/alphai * safeInv(DrhoDt(i)/rho(i), 0.01*csi*Dimension::nDim/H(i).Trace()));
164-
} else {
165-
fDSnew(i) = 1.0;
163+
// Optionally update the deviatoric stress scaling term
164+
if (mJutziStateUpdate) {
165+
fDSnew(i) = std::max(0.0, std::min(1.0, 1.0 - DalphaDepsi/rhoS(i)));
166+
// 1.0 + DalphaDt(i)/alphai * safeInv(DrhoDt(i)/rho(i), 0.01*csi*Dimension::nDim/H(i).Trace()));
167+
} else {
168+
fDSnew(i) = 1.0;
169+
}
166170
}
167171

168172
#pragma omp critical

0 commit comments

Comments
 (0)