Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
d5de7f3
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
662836f
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
df505c2
Update SolidMechanicsFields.hpp
ryar9534 Oct 3, 2024
3b0bd7b
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
78e4db4
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
a23f26f
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
c2325c3
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
27a4801
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
18a94b2
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
c7e03b9
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
2f4e691
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
3cf18ca
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
4284d71
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
cd42322
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
6700051
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
5c8f164
Update SolidMechanicsLagrangianFEM.cpp
ryar9534 Oct 3, 2024
7a51c30
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
ca89c99
Update StrainHelper.hpp
ryar9534 Oct 3, 2024
0e72772
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Oct 3, 2024
4f21e46
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Oct 7, 2024
cf6fe98
initial implementation, behavior is almost right but need to debug in…
ryar9534 Oct 11, 2024
8fda259
remove extraneous file
ryar9534 Oct 11, 2024
f5f1fa7
initial proposal for handling prescribed displacements and sign diffe…
ryar9534 Oct 15, 2024
d192712
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Nov 5, 2024
1de0c2c
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Nov 27, 2024
48db73d
simple method for handling BCs, may want to put in a disclaimer
ryar9534 Dec 4, 2024
583e7de
Update SolidMechanicsStateReset.cpp
ryar9534 Dec 5, 2024
e9bd953
Update StrainHelper.hpp
ryar9534 Dec 5, 2024
9abd3da
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Dec 5, 2024
25ddb6a
Update SolidMechanicsStateReset.cpp
ryar9534 Dec 5, 2024
ccc1b0d
uncrustify
ryar9534 Dec 5, 2024
913a1a0
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Dec 9, 2024
179e4fd
Apply suggestions from code review
ryar9534 Dec 11, 2024
834bba6
Apply suggestions from code review
ryar9534 Dec 11, 2024
3b9372e
Update ElasticIsotropicPressureDependent.hpp
ryar9534 Dec 11, 2024
136fe65
Update ElasticIsotropicPressureDependent.hpp
ryar9534 Dec 11, 2024
dbf7497
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Dec 11, 2024
246dbc8
Update ElasticIsotropicPressureDependent.hpp
ryar9534 Dec 11, 2024
bb4dfc8
uncrustify
ryar9534 Dec 11, 2024
ee9d389
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Dec 11, 2024
4e6c411
Update .integrated_tests.yaml
ryar9534 Dec 11, 2024
ce59c54
Update BASELINE_NOTES.md
ryar9534 Dec 11, 2024
beae829
add elastic strain functions to ElasticOrthotropic
ryar9534 Dec 13, 2024
a5164dc
Update ElasticOrthotropic.hpp
ryar9534 Dec 13, 2024
d403991
Add elastic strain functions to ElasticTransverseIsotropic
ryar9534 Dec 13, 2024
b04133d
Update .integrated_tests.yaml
ryar9534 Dec 16, 2024
d8a1680
uncrustify
ryar9534 Dec 16, 2024
bb8efc1
Merge branch 'develop' into feature/aronson/plasticStrainOutput
ryar9534 Dec 16, 2024
01cce1e
Update .integrated_tests.yaml
ryar9534 Dec 16, 2024
cfe31b2
Merge branch 'develop' into feature/aronson/plasticStrainOutput
rrsettgast Dec 16, 2024
caef37b
Update .integrated_tests.yaml
ryar9534 Dec 16, 2024
69ade8d
restructure elasticIsotropic
ryar9534 Dec 16, 2024
576e7bb
restructure elasticOrthotropic
ryar9534 Dec 16, 2024
54f91fc
restructure elasticTransverseIsotropic
ryar9534 Dec 16, 2024
93b5268
uncrustify
ryar9534 Dec 16, 2024
592b991
Update StrainHelper.hpp to output tensor strain not engineering
ryar9534 Dec 19, 2024
381d6ba
Merge branch 'develop' into feature/aronson/plasticStrainOutput
paveltomin Dec 19, 2024
2c13f68
Update .integrated_tests.yaml
ryar9534 Dec 20, 2024
74c7226
Merge branch 'develop' into feature/aronson/plasticStrainOutput
paveltomin Dec 20, 2024
4e0f693
Merge branch 'develop' into feature/aronson/plasticStrainOutput
paveltomin Jan 7, 2025
0ce3b32
Update .integrated_tests.yaml
paveltomin Jan 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .integrated_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baselines:
bucket: geosx
baseline: integratedTests/baseline_integratedTests-pr3486-9492-f0c817c
baseline: integratedTests/baseline_integratedTests-pr3384-9542-4e0f693
allow_fail:
all: ''
streak: ''
4 changes: 4 additions & 0 deletions BASELINE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This file is designed to track changes to the integrated test baselines.
Any developer who updates the baseline ID in the .integrated_tests.yaml file is expected to create an entry in this file with the pull request number, date, and their justification for rebaselining.
These notes should be in reverse-chronological order, and use the following time format: (YYYY-MM-DD).

PR #3384 (2024-01-07)
=====================
Added plastic strain output.

PR #3486 (2025-01-06)
=====================
useNewGravity became gravityDensityScheme.
Expand Down
57 changes: 49 additions & 8 deletions src/coreComponents/constitutive/solid/ElasticIsotropic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@
localIndex const q,
real64 ( &elasticStrain )[6] ) const override final;

GEOS_HOST_DEVICE
virtual void getElasticStrainInc( localIndex const k,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
virtual void getElasticStrainInc( localIndex const k,
virtual void calculateElasticStrainInc( localIndex const k,

Since this isn't really a "getter"

localIndex const q,
real64 ( &elasticStrainInc )[6] ) const override final;

GEOS_HOST_DEVICE
virtual real64 getBulkModulus( localIndex const k ) const override final
{
Expand Down Expand Up @@ -171,6 +176,13 @@

protected:

GEOS_HOST_DEVICE
virtual void computeElasticStrain( localIndex const k,
localIndex const q,
real64 const ( &stress )[6],
real64 ( &elasticStrainInc )[6] ) const;


/// A reference to the ArrayView holding the bulk modulus for each element.
arrayView1d< real64 const > const m_bulkModulus;

Expand Down Expand Up @@ -210,24 +222,53 @@
}


GEOS_HOST_DEVICE
inline
void ElasticIsotropicUpdates::computeElasticStrain( localIndex const k,
localIndex const q,
real64 const ( &stress )[6],
real64 ( & elasticStrain)[6] ) const
{
GEOS_UNUSED_VAR( q );
real64 const E = conversions::bulkModAndShearMod::toYoungMod( m_bulkModulus[k], m_shearModulus[k] );
real64 const nu = conversions::bulkModAndShearMod::toPoissonRatio( m_bulkModulus[k], m_shearModulus[k] );

elasticStrain[0] = ( stress[0] - nu*stress[1] - nu*stress[2])/E;
elasticStrain[1] = (-nu*stress[0] + stress[1] - nu*stress[2])/E;
elasticStrain[2] = (-nu*stress[0] - nu*stress[1] + stress[2])/E;

elasticStrain[3] = stress[3] / m_shearModulus[k];
elasticStrain[4] = stress[4] / m_shearModulus[k];
elasticStrain[5] = stress[5] / m_shearModulus[k];
}

GEOS_HOST_DEVICE
inline
void ElasticIsotropicUpdates::getElasticStrain( localIndex const k,
localIndex const q,
real64 ( & elasticStrain)[6] ) const
{
real64 const E = conversions::bulkModAndShearMod::toYoungMod( m_bulkModulus[k], m_shearModulus[k] );
real64 const nu = conversions::bulkModAndShearMod::toPoissonRatio( m_bulkModulus[k], m_shearModulus[k] );

elasticStrain[0] = ( m_newStress[k][q][0] - nu*m_newStress[k][q][1] - nu*m_newStress[k][q][2])/E;
elasticStrain[1] = (-nu*m_newStress[k][q][0] + m_newStress[k][q][1] - nu*m_newStress[k][q][2])/E;
elasticStrain[2] = (-nu*m_newStress[k][q][0] - nu*m_newStress[k][q][1] + m_newStress[k][q][2])/E;
real64 stress[6] = {m_newStress[k][q][0], m_newStress[k][q][1], m_newStress[k][q][2], m_newStress[k][q][3], m_newStress[k][q][4], m_newStress[k][q][5]};

computeElasticStrain( k, q, stress, elasticStrain );

elasticStrain[3] = m_newStress[k][q][3] / m_shearModulus[k];
elasticStrain[4] = m_newStress[k][q][4] / m_shearModulus[k];
elasticStrain[5] = m_newStress[k][q][5] / m_shearModulus[k];
}

GEOS_HOST_DEVICE
inline
void ElasticIsotropicUpdates::getElasticStrainInc( localIndex const k,

Check warning on line 260 in src/coreComponents/constitutive/solid/ElasticIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropic.hpp#L260

Added line #L260 was not covered by tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void ElasticIsotropicUpdates::getElasticStrainInc( localIndex const k,
void ElasticIsotropicUpdates::calculateElasticStrainInc( localIndex const k,

localIndex const q,
real64 ( & elasticStrainInc)[6] ) const
{

real64 stress[6] =
{m_newStress[k][q][0] - m_oldStress[k][q][0], m_newStress[k][q][1] - m_oldStress[k][q][1], m_newStress[k][q][2] - m_oldStress[k][q][2], m_newStress[k][q][3] - m_oldStress[k][q][3],
m_newStress[k][q][4] - m_oldStress[k][q][4], m_newStress[k][q][5] - m_oldStress[k][q][5]};

Check warning on line 267 in src/coreComponents/constitutive/solid/ElasticIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropic.hpp#L266-L267

Added lines #L266 - L267 were not covered by tests

computeElasticStrain( k, q, stress, elasticStrainInc );

Check warning on line 269 in src/coreComponents/constitutive/solid/ElasticIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropic.hpp#L269

Added line #L269 was not covered by tests

}

Check warning on line 271 in src/coreComponents/constitutive/solid/ElasticIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropic.hpp#L271

Added line #L271 was not covered by tests

GEOS_HOST_DEVICE
inline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@
localIndex const q,
real64 ( &elasticStrain )[6] ) const override final;

GEOS_HOST_DEVICE
virtual void getElasticStrainInc( localIndex const k,
localIndex const q,
real64 ( &elasticStrainInc )[6] ) const override final;

GEOS_HOST_DEVICE
virtual void viscousStateUpdate( localIndex const k,
localIndex const q,
Expand Down Expand Up @@ -223,6 +228,60 @@
}


GEOS_HOST_DEVICE
inline
void ElasticIsotropicPressureDependentUpdates::getElasticStrainInc( localIndex const k,

Check warning on line 233 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L233

Added line #L233 was not covered by tests
localIndex const q,
real64 ( & elasticStrainInc)[6] ) const
{
real64 const mu = m_shearModulus[k];
real64 const p0 = m_refPressure;
real64 const eps_v0 = m_refStrainVol;
real64 const Cr = m_recompressionIndex[k];
real64 deviator[6]{};
real64 stress[6]{};

Check warning on line 242 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L237-L242

Added lines #L237 - L242 were not covered by tests
real64 P;
real64 Q;

LvArray::tensorOps::copy< 6 >( stress, m_newStress[k][q] );

Check warning on line 246 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L246

Added line #L246 was not covered by tests

twoInvariant::stressDecomposition( stress,

Check warning on line 248 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L248

Added line #L248 was not covered by tests
P,
Q,
deviator );

real64 elasticStrainVol = LvArray::math::log( P/p0 ) * Cr * (-1.0) + eps_v0;
real64 elasticStrainDev = Q/3./mu;

Check warning on line 254 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L253-L254

Added lines #L253 - L254 were not covered by tests

twoInvariant::strainRecomposition( elasticStrainVol,

Check warning on line 256 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L256

Added line #L256 was not covered by tests
elasticStrainDev,
deviator,
elasticStrainInc );

real64 oldStrain[6]{};

Check warning on line 261 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L261

Added line #L261 was not covered by tests

LvArray::tensorOps::copy< 6 >( stress, m_oldStress[k][q] );

Check warning on line 263 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L263

Added line #L263 was not covered by tests

twoInvariant::stressDecomposition( stress,

Check warning on line 265 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L265

Added line #L265 was not covered by tests
P,
Q,
deviator );

elasticStrainVol = LvArray::math::log( P/p0 ) * Cr * (-1.0) + eps_v0;
elasticStrainDev = Q/3./mu;

Check warning on line 271 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L270-L271

Added lines #L270 - L271 were not covered by tests

twoInvariant::strainRecomposition( elasticStrainVol,

Check warning on line 273 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L273

Added line #L273 was not covered by tests
elasticStrainDev,
deviator,
oldStrain );

for( localIndex i = 0; i<6; ++i )

Check warning on line 278 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L278

Added line #L278 was not covered by tests
{
elasticStrainInc[i] -= oldStrain[i];

Check warning on line 280 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L280

Added line #L280 was not covered by tests
}
}

Check warning on line 282 in src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticIsotropicPressureDependent.hpp#L282

Added line #L282 was not covered by tests


GEOS_HOST_DEVICE
inline
void ElasticIsotropicPressureDependentUpdates::smallStrainUpdate( localIndex const k,
Expand Down
75 changes: 75 additions & 0 deletions src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,16 @@
real64 ( &stress )[6],
DiscretizationOps & stiffness ) const final;

GEOS_HOST_DEVICE
virtual void getElasticStrain( localIndex const k,
localIndex const q,
real64 ( &elasticStrain )[6] ) const override final;

GEOS_HOST_DEVICE
virtual void getElasticStrainInc( localIndex const k,
localIndex const q,
real64 ( &elasticStrainInc )[6] ) const override final;

// miscellaneous getters

GEOS_HOST_DEVICE
Expand All @@ -162,6 +172,13 @@
return LvArray::math::max( LvArray::math::max( m_c44[k], m_c55[k] ), m_c66[k] );
}

protected:
GEOS_HOST_DEVICE
virtual void computeElasticStrain( localIndex const k,
localIndex const q,
real64 const (&stress)[6],
real64 ( &elasticStrain )[6] ) const;

private:
/// A reference to the ArrayView holding c11 for each element.
arrayView1d< real64 const > const m_c11;
Expand Down Expand Up @@ -219,6 +236,64 @@
stiffness[5][5] = m_c66[k];
}


GEOS_HOST_DEVICE
inline
void ElasticOrthotropicUpdates::computeElasticStrain( localIndex const k,

Check warning on line 242 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L242

Added line #L242 was not covered by tests
localIndex const q,
real64 const (&stress)[6],
real64 ( & elasticStrain)[6] ) const
{

GEOS_UNUSED_VAR( q );

Check warning on line 248 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L248

Added line #L248 was not covered by tests

real64 const detC = m_c11[k]*(m_c22[k]*m_c33[k] - m_c23[k]*m_c23[k]) - m_c12[k]*(m_c12[k]*m_c33[k] - m_c23[k]*m_c13[k]) + m_c13[k]*(m_c12[k]*m_c23[k] - m_c22[k]*m_c13[k]);

Check warning on line 250 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L250

Added line #L250 was not covered by tests

elasticStrain[0] =
( (m_c22[k]*m_c33[k] - m_c23[k]*m_c23[k])*stress[0] + (m_c13[k]*m_c23[k] - m_c12[k]*m_c33[k])*stress[1] + (m_c12[k]*m_c23[k] - m_c13[k]*m_c22[k])*stress[2] ) /

Check warning on line 253 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L252-L253

Added lines #L252 - L253 were not covered by tests
detC;
elasticStrain[1] =
( (m_c23[k]*m_c13[k] - m_c12[k]*m_c33[k])*stress[0] + (m_c11[k]*m_c33[k] - m_c13[k]*m_c13[k])*stress[1] + (m_c13[k]*m_c12[k] - m_c11[k]*m_c23[k])*stress[2] ) /

Check warning on line 256 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L255-L256

Added lines #L255 - L256 were not covered by tests
detC;
elasticStrain[2] =
( (m_c12[k]*m_c23[k] - m_c22[k]*m_c13[k])*stress[0] + (m_c12[k]*m_c13[k] - m_c11[k]*m_c23[k])*stress[1] + (m_c11[k]*m_c22[k] - m_c12[k]*m_c12[k])*stress[2] ) /

Check warning on line 259 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L258-L259

Added lines #L258 - L259 were not covered by tests
detC;

elasticStrain[3] = stress[3] / m_c44[k];
elasticStrain[4] = stress[4] / m_c55[k];
elasticStrain[5] = stress[5] / m_c66[k];
}

Check warning on line 265 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L262-L265

Added lines #L262 - L265 were not covered by tests


GEOS_HOST_DEVICE
inline
void ElasticOrthotropicUpdates::getElasticStrain( localIndex const k,

Check warning on line 270 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L270

Added line #L270 was not covered by tests
localIndex const q,
real64 ( & elasticStrain)[6] ) const
{

real64 stress[6] = {m_newStress[k][q][0], m_newStress[k][q][1], m_newStress[k][q][2], m_newStress[k][q][3], m_newStress[k][q][4], m_newStress[k][q][5]};

Check warning on line 275 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L275

Added line #L275 was not covered by tests

computeElasticStrain( k, q, stress, elasticStrain );

Check warning on line 277 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L277

Added line #L277 was not covered by tests

}

Check warning on line 279 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L279

Added line #L279 was not covered by tests

GEOS_HOST_DEVICE
inline
void ElasticOrthotropicUpdates::getElasticStrainInc( localIndex const k,

Check warning on line 283 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L283

Added line #L283 was not covered by tests
localIndex const q,
real64 ( & elasticStrainInc)[6] ) const
{

real64 stress[6] =
{m_newStress[k][q][0] - m_oldStress[k][q][0], m_newStress[k][q][1] - m_oldStress[k][q][1], m_newStress[k][q][2] - m_oldStress[k][q][2], m_newStress[k][q][3] - m_oldStress[k][q][3],
m_newStress[k][q][4] - m_oldStress[k][q][4], m_newStress[k][q][5] - m_oldStress[k][q][5]};

Check warning on line 290 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L289-L290

Added lines #L289 - L290 were not covered by tests

computeElasticStrain( k, q, stress, elasticStrainInc );

Check warning on line 292 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L292

Added line #L292 was not covered by tests

}

Check warning on line 294 in src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticOrthotropic.hpp#L294

Added line #L294 was not covered by tests


inline
GEOS_HOST_DEVICE
void ElasticOrthotropicUpdates::smallStrainNoStateUpdate_StressOnly( localIndex const k,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@
GEOS_HOST_DEVICE
virtual void getElasticStiffness( localIndex const k, localIndex const q, real64 ( &stiffness )[6][6] ) const override final;

GEOS_HOST_DEVICE
virtual void getElasticStrain( localIndex const k,
localIndex const q,
real64 ( &elasticStrain )[6] ) const override final;

GEOS_HOST_DEVICE
virtual void getElasticStrainInc( localIndex const k,
localIndex const q,
real64 ( &elasticStrainInc )[6] ) const override final;

/**
* @brief Getter for apparent shear modulus.
* @return reference to shear modulus that will be used for computing stabilization scalling parameter.
Expand All @@ -155,6 +165,15 @@
}


protected:

GEOS_HOST_DEVICE
virtual void computeElasticStrain( localIndex const k,
localIndex const q,
real64 const (&stress)[6],
real64 ( &elasticStrain )[6] ) const;


private:

/// A reference to the ArrayView holding c11 for each element.
Expand Down Expand Up @@ -200,6 +219,57 @@
stiffness[5][5] = m_c66[k];
}

GEOS_HOST_DEVICE
inline
void ElasticTransverseIsotropicUpdates::computeElasticStrain( localIndex const k,

Check warning on line 224 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L224

Added line #L224 was not covered by tests
localIndex const q,
real64 const (&stress)[6],
real64 ( & elasticStrain)[6] ) const
{
GEOS_UNUSED_VAR( q );
real64 const c12 = ( m_c11[k] - 2.0 * m_c66[k] );
real64 const detC = m_c11[k]*(m_c11[k]*m_c33[k] - m_c13[k]*m_c13[k]) - c12*(c12*m_c33[k] - m_c13[k]*m_c13[k]) + m_c13[k]*(c12*m_c13[k] - m_c11[k]*m_c13[k]);

Check warning on line 231 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L229-L231

Added lines #L229 - L231 were not covered by tests

elasticStrain[0] =
( (m_c11[k]*m_c33[k] - m_c13[k]*m_c13[k])*stress[0] + (m_c13[k]*m_c13[k] - c12*m_c33[k])*stress[1] + (c12*m_c13[k] - m_c13[k]*m_c11[k])*stress[2] ) / detC;
elasticStrain[1] =
( (m_c13[k]*m_c13[k] - c12*m_c33[k])*stress[0] + (m_c11[k]*m_c33[k] - m_c13[k]*m_c13[k])*stress[1] + (m_c13[k]*c12 - m_c11[k]*m_c13[k])*stress[2] ) / detC;
elasticStrain[2] = ( (c12*m_c13[k] - m_c11[k]*m_c13[k])*stress[0] + (c12*m_c13[k] - m_c11[k]*m_c13[k])*stress[1] + (m_c11[k]*m_c11[k] - c12*c12)*stress[2] ) / detC;

Check warning on line 237 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L233-L237

Added lines #L233 - L237 were not covered by tests

elasticStrain[3] = stress[3] / m_c44[k];
elasticStrain[4] = stress[4] / m_c44[k];
elasticStrain[5] = stress[5] / m_c66[k];
}

Check warning on line 242 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L239-L242

Added lines #L239 - L242 were not covered by tests


GEOS_HOST_DEVICE
inline
void ElasticTransverseIsotropicUpdates::getElasticStrain( localIndex const k,

Check warning on line 247 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L247

Added line #L247 was not covered by tests
localIndex const q,
real64 ( & elasticStrain)[6] ) const
{

real64 stress[6] = {m_newStress[k][q][0], m_newStress[k][q][1], m_newStress[k][q][2], m_newStress[k][q][3], m_newStress[k][q][4], m_newStress[k][q][5]};

Check warning on line 252 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L252

Added line #L252 was not covered by tests

computeElasticStrain( k, q, stress, elasticStrain );

Check warning on line 254 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L254

Added line #L254 was not covered by tests

}

Check warning on line 256 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L256

Added line #L256 was not covered by tests

GEOS_HOST_DEVICE
inline
void ElasticTransverseIsotropicUpdates::getElasticStrainInc( localIndex const k,

Check warning on line 260 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L260

Added line #L260 was not covered by tests
localIndex const q,
real64 ( & elasticStrainInc)[6] ) const
{

real64 stress[6] =
{m_newStress[k][q][0] - m_oldStress[k][q][0], m_newStress[k][q][1] - m_oldStress[k][q][1], m_newStress[k][q][2] - m_oldStress[k][q][2], m_newStress[k][q][3] - m_oldStress[k][q][3],
m_newStress[k][q][4] - m_oldStress[k][q][4], m_newStress[k][q][5] - m_oldStress[k][q][5]};

Check warning on line 267 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L266-L267

Added lines #L266 - L267 were not covered by tests

computeElasticStrain( k, q, stress, elasticStrainInc );

Check warning on line 269 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L269

Added line #L269 was not covered by tests

}

Check warning on line 271 in src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/ElasticTransverseIsotropic.hpp#L271

Added line #L271 was not covered by tests

inline
GEOS_HOST_DEVICE
void ElasticTransverseIsotropicUpdates::smallStrainNoStateUpdate_StressOnly( localIndex const k,
Expand Down
18 changes: 18 additions & 0 deletions src/coreComponents/constitutive/solid/SolidBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,24 @@
GEOS_ERROR( "getElasticStrain() not implemented for this model" );
}

/**
* @brief Return the current elastic strain increment at a given material point (small-strain interface)
*
* @param k the element inex
* @param q the quadrature index
* @param elasticStrainInc Current elastic strain increment
*/
GEOS_HOST_DEVICE
virtual void getElasticStrainInc( localIndex const k,

Check warning on line 348 in src/coreComponents/constitutive/solid/SolidBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/SolidBase.hpp#L348

Added line #L348 was not covered by tests
localIndex const q,
real64 ( & elasticStrainInc )[6] ) const
{
GEOS_UNUSED_VAR( k );
GEOS_UNUSED_VAR( q );
GEOS_UNUSED_VAR( elasticStrainInc );
GEOS_ERROR( "getElasticStrainInc() of SolidBase was called." );
}

Check warning on line 356 in src/coreComponents/constitutive/solid/SolidBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/solid/SolidBase.hpp#L352-L356

Added lines #L352 - L356 were not covered by tests

/**
* @brief Perform a viscous (rate-dependent) state update
*
Expand Down
Loading
Loading