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

Adding MaterialRealCMMAux and some other changes. #376

Merged
merged 6 commits into from
Jun 22, 2021

Conversation

cbolisetti
Copy link
Contributor

@cbolisetti cbolisetti commented Jun 10, 2021

Makes the following changes/additions:

  • Add the MaterialRealCMMAux, tests, and doco.
  • Changes to linear spring material property variables to convert them to ColumnMajorMatrix instead, so that they are consistent with isolator materials.
  • Other miscellaneous changes and addressing a doco bug.

Closes #374 #356 and #326

@moosebuild
Copy link

moosebuild commented Jun 10, 2021

Job Test on 217598f wanted to post the following:

View the site here

This comment will be updated on new commits.

@cbolisetti cbolisetti requested a review from somu15 June 10, 2021 20:51
@cbolisetti
Copy link
Contributor Author

@somu15 can you please review this?

Copy link
Contributor

@somu15 somu15 left a comment

Choose a reason for hiding this comment

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

@cbolisetti I did an initial review. Let me know if you have any questions.

a material property that is of type, ColumnMajorMatrix (CMM). In MASTODON, a
common use case is accessing the deformation or force CMMs from link elements
when the [`LinearSpring`](source/materials/LinearSpring.md) material or any of
the seismic isolator materials (e.g., [`ComputeFPIsolatorElasticity`](source/materials/ComputeFPIsolatorElasticity.md)) is used. This `AuxKernel` and the corresponding
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this mean we can directly get the isolator deformations without having to do a difference between top and bottom node displacements? If so, can you please state this explicitly so that the benefits of this auxkernel are clearer?

InputParameters params = MaterialAuxBase<>::validParams();
params.addClassDescription(
"Populate an auxiliary variable with an entry from a ColumnMajorMatrix material property.");
params.addParam<unsigned int>("row", 0, "The row component to consider for this kernel");
Copy link
Contributor

Choose a reason for hiding this comment

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

How will the user know which row to use here?

params.addClassDescription(
"Populate an auxiliary variable with an entry from a ColumnMajorMatrix material property.");
params.addParam<unsigned int>("row", 0, "The row component to consider for this kernel");
params.addParam<unsigned int>("column", 0, "The column component to consider for this kernel");
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to previous, how to know which column to use?

@@ -33,8 +33,8 @@ StressDivergenceDamper::StressDivergenceDamper(const InputParameters & parameter
_component(getParam<unsigned int>("component")),
_ndisp(coupledComponents("displacements")),
_disp_var(_ndisp),
_Fg(getMaterialPropertyByName<ColumnMajorMatrix>("global_forces")),
_Kg(getMaterialPropertyByName<ColumnMajorMatrix>("global_stiffness_matrix"))
_Fg(getMaterialPropertyByName<ColumnMajorMatrix>("fvd_global_forces")),
Copy link
Contributor

Choose a reason for hiding this comment

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

You are changing these names so that there is consistency across all line type materials? Like Spring, Isolator, etc.?

_total_gl(getMaterialPropertyByName<ColumnMajorMatrix>("total_global_to_local_transformation")),
_total_lb(getMaterialPropertyByName<ColumnMajorMatrix>("total_local_to_basic_transformation")),
_length(getMaterialPropertyByName<Real>("initial_isolator_length")),
_basic_def(getMaterialPropertyByName<ColumnMajorMatrix>("si_deformations")),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please explain the reason for changing these names?

@moosebuild
Copy link

Job Precheck on 2199c99 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/mastodon/docs/PRs/376/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format a9ccdaf6572ceb7b112cd8e5c95d699ca19aa57d

@cbolisetti
Copy link
Contributor Author

@somu15 thanks for the review. I was going to remove the commits on changes in material properties, but I forgot -- my bad. Those were supposed to address #356. I am not yet sure what the solution for that is, but I will leave it for now. Please check out the commits now. I added some more detail in the auxkernel doco. Note that this is similar to the RankTwoTensor auxkernel, in which the user needs to know which component of the tensor corresponds to which stress component, etc. I added some language about this in the end.

Copy link
Contributor

@somu15 somu15 left a comment

Choose a reason for hiding this comment

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

@cbolisetti This looks good. One comment is, if the user requests a row/column value outside the validity range, do you want to throw a moose error in the auxkernel? Or else, what is your thought on this?


!listing test/tests/auxkernels/materialrealcmm/spring_static.i block=AuxKernels

In this input, the AuxKernel takes the element (0, 0) from the CMM material property named, "global_forces" in the linear spring material. (See LinearSpring.C for other material properties.) In this example, the linear spring material is only defined in block '0' and therefore this AuxKernel and AuxVariable are also restricted to this block. The element (0, 0) of the material property "global_forces" corresponds to the axial force in the spring. Currently, in order to know what each of the elements in a material property CMM correspond to, users will either have to go through the source code or reach out to one of the MASTODON developers [here](help/contact_us.md).
Copy link
Contributor

Choose a reason for hiding this comment

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

This information is very helpful to the users.

@cbolisetti
Copy link
Contributor Author

@cbolisetti This looks good. One comment is, if the user requests a row/column value outside the validity range, do you want to throw a moose error in the auxkernel? Or else, what is your thought on this?

@somu15 yes, the AuxKernel will throw an error when that happens. See lines 42 and 43 of MaterialRealCMMAux.C

@somu15
Copy link
Contributor

somu15 commented Jun 21, 2021

@cbolisetti This looks good. One comment is, if the user requests a row/column value outside the validity range, do you want to throw a moose error in the auxkernel? Or else, what is your thought on this?

@somu15 yes, the AuxKernel will throw an error when that happens. See lines 42 and 43 of MaterialRealCMMAux.C

Sounds good! Thanks for the clarification.

@cbolisetti cbolisetti merged commit dfb8fbb into idaholab:devel Jun 22, 2021
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.

Create AuxKernel to output MaterialProperty that is in ColumnMajorMatrix form
3 participants