Skip to content

Separate mechanics, fracture, and thermal models#295

Open
streeve wants to merge 7 commits into
ORNL:mainfrom
streeve:separate_fracture_thermal_models
Open

Separate mechanics, fracture, and thermal models#295
streeve wants to merge 7 commits into
ORNL:mainfrom
streeve:separate_fracture_thermal_models

Conversation

@streeve

@streeve streeve commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Separate mechanics, fracture, and thermal models

ForceModel uses combinations of MechanicsModel and FractureModel to run dynamics. ThermalForceModel uses combinations of MechanicsModel, FractureModel, and ThermalModel. It is likely not obvious why only certain options are available

  • Retain the original models as wrappers around these better separated components
  • Renames generic reuse of the Fracture tag with CriticalStretch since that's actually how we model bond failure

TODO: agree on naming. In particular, I'm not sure I want Experimental namespace, but it was a quick easy choice. May be time for a discussion on deprecation timelines of the old models as well

@streeve streeve requested a review from JBludau February 25, 2026 00:09
@streeve streeve self-assigned this Feb 25, 2026
Comment thread src/CabanaPD_Types.hpp Outdated
@JBludau

JBludau commented Feb 26, 2026

Copy link
Copy Markdown
Collaborator

I am in favor of this ... Maybe we should think about some changes we want to do until 1.0 and when we want that to be.
I would say it is fair game to change the interface in a major version and with our limited user base it might be ok to not yet have a deprecation cycle. We could add one for >1.0

@streeve streeve changed the title Separate fracture thermal models Separate mechanics, fracture, and thermal models Feb 26, 2026
@streeve

streeve commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator Author

I am in favor of this ... Maybe we should think about some changes we want to do until 1.0 and when we want that to be. I would say it is fair game to change the interface in a major version and with our limited user base it might be ok to not yet have a deprecation cycle. We could add one for >1.0

To be honest we've changed interfaces a number of times in this version, but I'm trying to reduce that as we grow. You're right about the deprecation cycle - let's wait on that.

I still haven't come up with a good naming for OldForceModel and NewForceModel though

@streeve

streeve commented Feb 27, 2026

Copy link
Copy Markdown
Collaborator Author

@JBludau I can split out some of the simpler changes (tag renaming) if you want, but can you review? This is kind of blocking the custom properties. Presuming we keep the older heavily inherited models, the plan would be to only support constant material properties in those

@JBludau JBludau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is going into the right direction. Not sure though if Experimental is the right call here, given that we already plan on using it in the internals

Comment thread src/force_models/CabanaPD_PMB.hpp Outdated
Comment on lines +327 to +329
: public Experimental::ThermalForceModel<
MechanicsModel<PMB, Elastic>,
ThermalModel<TemperatureDependent, TemperatureType>>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

hmm ... with this the new model is no longer in experimental, right? If we implement our backward compatibility with it is per definition the new way of doing things.
Also, we would be recommending to use a method in Experimental in our examples. Maybe we should just leap and promote it to the main namespace in one go?
Or, if we want to slowly get used to it: put it in Impl and allow us developers to just use it for testing until we are sure it is ready.

But I don't know the best way forward

Comment thread src/CabanaPD_ForceModels.hpp Outdated
ThermalModel( const base_fracture_type fracture,
const TemperatureType _temp, const double _alpha,
const double _temp0 )
: base_fracture_type( fracture )

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok, so we don't take it by reference here ... so that should be fine with our device capture

@JBludau

JBludau commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

@JBludau I can split out some of the simpler changes (tag renaming) if you want, but can you review? This is kind of blocking the custom properties. Presuming we keep the older heavily inherited models, the plan would be to only support constant material properties in those

The tag rename is pretty straightforward so I think it is fine doing it in one go here

@streeve streeve force-pushed the separate_fracture_thermal_models branch from 6f931a5 to 132d984 Compare March 6, 2026 21:35

@JBludau JBludau left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I like the direction

@streeve

streeve commented Apr 15, 2026

Copy link
Copy Markdown
Collaborator Author

@JBludau this sat a long time in attempting not to break everything at the end of the quarter. Found one more thing in discussion with Pablo - LPS still isn't ready for thermomechanics. I'll merge soon unless there's a new reason to hold

@streeve streeve force-pushed the separate_fracture_thermal_models branch from 6ba884f to 131ee2a Compare May 29, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants