Skip to content

feat: Add Young Modulus & Poisson import from VTK mesh#4021

Open
npillardou wants to merge 5 commits intodevelopfrom
feat/npillardou/vtkmesh-youngs-poisson-import
Open

feat: Add Young Modulus & Poisson import from VTK mesh#4021
npillardou wants to merge 5 commits intodevelopfrom
feat/npillardou/vtkmesh-youngs-poisson-import

Conversation

@npillardou
Copy link
Copy Markdown
Contributor

@npillardou npillardou commented Apr 8, 2026

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>

@npillardou npillardou changed the title Add Young Modulus & Poisson import from VTK mesh feat: Add Young Modulus & Poisson import from VTK mesh Apr 8, 2026
@npillardou npillardou added type: feature New feature or request ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI ci: run code coverage enables running of the code coverage CI jobs labels Apr 10, 2026
continue;

// E was imported and is positive: nu must also be valid
GEOS_ERROR_IF( nu[k] <= -0.5 || nu[k] >= 0.5,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For most common materials, Poisson’s ratio falls within the range of 0 to 0.5.

Copy link
Copy Markdown
Contributor

@dkachuma dkachuma left a comment

Choose a reason for hiding this comment

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

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}). "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this causes a change to the schema.xsd.other. Can you upload this file as well please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI type: feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants