Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take strain_free_density as initial value for density calculation #29773

Open
wants to merge 5 commits into
base: next
Choose a base branch
from

Conversation

tophmatthews
Copy link
Contributor

@tophmatthews tophmatthews commented Jan 31, 2025

Creates new MaterialPropertyName strain_free_density that will replace the now deprecated density param. This enables the use of a material property for density independent of strains (say for example, dependent on chemistry), which can be changed throughout a simulation. Added test for Density in modules/misc/test/tests as well since Density is in the misc module, but is only tested in combined (almost seems like density should be in solid_mechanics but whatevs).

ping maybe @bwspenc and @dschwen ?

Closes #29556

@moosebuild
Copy link
Contributor

moosebuild commented Jan 31, 2025

Job Documentation, step Docs: sync website on 443539c wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Feb 1, 2025

Job Coverage, step Generate coverage on 443539c wanted to post the following:

Framework coverage

Coverage did not change

Modules coverage

Misc

32662f #29773 443539
Total Total +/- New
Rate 60.92% 69.62% +8.69% 91.67%
Hits 251 291 +40 11
Misses 161 127 -34 1

Diff coverage report

Full coverage report

Full coverage reports

Reports

This comment will be updated on new commits.

@tophmatthews tophmatthews marked this pull request as ready for review February 2, 2025 20:03
@tophmatthews
Copy link
Contributor Author

Ready for you to take a look @bwspenc thanks!

@bwspenc
Copy link
Contributor

bwspenc commented Feb 12, 2025

@tophmatthews I think it's in misc because it's used by the heat_transfer module as well as mechanics.

Copy link
Contributor

@bwspenc bwspenc left a comment

Choose a reason for hiding this comment

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

This looks good to me. My only comment is that to me, it seems like it would be more natural to name the property name and input parameter initial_density rather thanstrain_free_density. Since that's how you chose to name your member variable that points to the input parameter I think you might feel the same way.

@tophmatthews
Copy link
Contributor Author

I think it's in misc because it's used by the heat_transfer module as well as mechanics.

Hm, I thought I removed a lot of "Density" at some point. Could just be a GenericConstantMaterial anyways. I'll look into this.

@bwspenc
Copy link
Contributor

bwspenc commented Feb 12, 2025

I guess it's up to the user to use whatever material model is most appropriate to define density, so they could use either this or GenericConstantMaterial.

@tophmatthews
Copy link
Contributor Author

input parameter initial_density rather thanstrain_free_density.

Yeah good suggestion. The bare minimum need for Density is an initial density. The use case added here is for evolving density due to everything but strain (e.g., changing chemistry conditions that changes density). Since strain_free_density kinda captures both, while using initial_density implies it's only the original, I went with strain_free_density. Does that make sense?

@tophmatthews
Copy link
Contributor Author

I guess it's up to the user to use whatever material model is most appropriate to define density, so they could use either this or GenericConstantMaterial.

Interestingly, there is an old comment in Density.C

// TODO: We should deprecate the !_is_coupled case and have the
  // user use a GenericConstantMaterial
  if (_is_coupled)

I didn't touch this at this time, but it does make a good point that unless you are using displacements, you don't need Density.C

@tophmatthews
Copy link
Contributor Author

I dont see Density in any other module except Combined (except for misc added in this PR).

@tophmatthews
Copy link
Contributor Author

it's in gui/tests and python/peacock. Not sure if those are pulling only misc and not solid_mechanics though.

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

Successfully merging this pull request may close these issues.

Allow density to change via strain-free chemistry changes
3 participants