feat: Add Young Modulus & Poisson import from VTK mesh#4021
feat: Add Young Modulus & Poisson import from VTK mesh#4021npillardou wants to merge 5 commits intodevelopfrom
Conversation
| continue; | ||
|
|
||
| // E was imported and is positive: nu must also be valid | ||
| GEOS_ERROR_IF( nu[k] <= -0.5 || nu[k] >= 0.5, |
There was a problem hiding this comment.
For most common materials, Poisson’s ratio falls within the range of 0 to 0.5.
dkachuma
left a comment
There was a problem hiding this comment.
My understanding of (nu, E, K and G) is that we need only 2 of these. What combinations are currently supported. Currently you can provide K and G. You're proposing nu and E I suppose, but can we do any other combinations. Maybe just add a note in the documentation. For example what happens if the user tries to load K and E?
| // youngModulus default is 0: negative values are invalid, zero means not imported | ||
| if( youngMod[k] < 0.0 ) | ||
| { | ||
| GEOS_WARNING( GEOS_FMT( "ElasticIsotropic '{}': element {} has negative Young's modulus ({:.6e}). " |
There was a problem hiding this comment.
This warning might flood the log if all the cells have negative values. I wouldn't issue the warning within the loop. Within the loop, simply count how many values are "bad" (perhaps pick out the worst case as well) and then outside the loop reduce over all ranks.
| ++numConverted; | ||
| } | ||
|
|
||
| GEOS_WARNING_IF( numInvalidE > 0, |
There was a problem hiding this comment.
Instead of issuing the warning on each rank, maybe sum numInvalidE over all ranks and issue a single warning on rank 0.
|
|
||
| registerField< fields::solid::youngModulus >( &m_youngModulus ); | ||
|
|
||
| registerField< fields::solid::poissonRatio >( &m_poissonRatio ); |
There was a problem hiding this comment.
I think this causes a change to the schema.xsd.other. Can you upload this file as well please.
This feature adds register data fields for Poisson's ratio and Young Modulus directly from VTK mesh, avoiding any external conversion operations.
It also offers the possibility to obtain them as output by adding (according to user needs) :
<Outputs> <VTK name="vtkOutput" fieldNames="{ rock_youngModulus, rock_poissonRatio }" /> </Outputs>