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

First round of review changes #2

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

bwspenc
Copy link

@bwspenc bwspenc commented Sep 27, 2018

@bwspenc
Copy link
Author

bwspenc commented Sep 27, 2018

@hchen139 As I'm going through this code, I think it will be easier for me to just make the changes in many cases, so I'd like to try this approach out. I can submit proposed changes, and you can merge them into your branch if you agree with them.

@@ -20,7 +20,7 @@ validParams<BondStatusPD>()
params.addClassDescription("Class for updating the bond status based on different failure "
"criteria: critical stretch and "
"maximum principal stress");
MooseEnum FailureCriteriaType("Critical_Stretch Maximum_Tensile_Stress", "Critical_Stretch");
Copy link
Author

Choose a reason for hiding this comment

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

A comment here: I changed these names to be more consistent with MOOSE conventions. I expected to break a test when I did that, but this is apparently not tested.

Copy link
Owner

Choose a reason for hiding this comment

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

This code has not been tested, i.e., there is no corresponding regression test. We don't really have a test for crack propagation problem.

@@ -16,7 +16,7 @@ InputParameters
validParams<MechanicalStretchPD>()
{
InputParameters params = validParams<AuxKernelBasePD>();
params.addClassDescription("Class for outputing bond mechanical stretch value");
params.addClassDescription("Class for outputing bond mechanical stretch");
params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
Copy link
Author

Choose a reason for hiding this comment

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

Can't you just use MaterialRealAux for this purpose? Also, I'm a little hesitant about setting a nonstandard value for 'execute_on' -- if the user wants it just for output purposes, I think I would expect them to set this.

Copy link
Owner

Choose a reason for hiding this comment

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

The MaterialRealAux outputs element volume-averaged material properties. There are some calculations related to volume and I'm sure whether they can be directly applied to Edge2 element. You are right, since the purpose of this AuxKernel is to output the bond mechanical stretch, it should be the user's decision to set the output frequency as they want.

enum class FailureCriterion
{
CriticalStretch,
MaximumTensileStress
Copy link
Owner

Choose a reason for hiding this comment

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

The correct available failure criterion name should be CriticalStretch and MaximumPrincipalStress. This is a bug in the original code.

@@ -20,7 +20,7 @@ validParams<BondStatusPD>()
params.addClassDescription("Class for updating the bond status based on different failure "
"criteria: critical stretch and "
"maximum principal stress");
MooseEnum FailureCriteriaType("Critical_Stretch Maximum_Tensile_Stress", "Critical_Stretch");
Copy link
Owner

Choose a reason for hiding this comment

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

This code has not been tested, i.e., there is no corresponding regression test. We don't really have a test for crack propagation problem.

@@ -20,7 +20,7 @@ validParams<BondStatusPD>()
params.addClassDescription("Class for updating the bond status based on different failure "
"criteria: critical stretch and "
"maximum principal stress");
MooseEnum FailureCriteriaType("Critical_Stretch Maximum_Tensile_Stress", "Critical_Stretch");
MooseEnum FailureCriteriaType("CriticalStretch MaximumTensileStress", "CriticalStretch");
Copy link
Owner

Choose a reason for hiding this comment

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

Again, we need to use MaximumPrincipalStress rather than MaximumTensileStress.

break;

case 1:
case FailureCriterion::MaximumTensileStress:
Copy link
Owner

Choose a reason for hiding this comment

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

FailureCriterion::MaximumPrincipalStress

val = _mechanical_stretch[0];
break;

case 1:
case FailureCriterion::MaximumTensileStress:
Copy link
Owner

Choose a reason for hiding this comment

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

FailureCriterion::MaximumPrincipalStress

@@ -16,7 +16,7 @@ InputParameters
validParams<MechanicalStretchPD>()
{
InputParameters params = validParams<AuxKernelBasePD>();
params.addClassDescription("Class for outputing bond mechanical stretch value");
params.addClassDescription("Class for outputing bond mechanical stretch");
params.set<ExecFlagEnum>("execute_on") = EXEC_TIMESTEP_END;
Copy link
Owner

Choose a reason for hiding this comment

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

The MaterialRealAux outputs element volume-averaged material properties. There are some calculations related to volume and I'm sure whether they can be directly applied to Edge2 element. You are right, since the purpose of this AuxKernel is to output the bond mechanical stretch, it should be the user's decision to set the output frequency as they want.

@hchen139
Copy link
Owner

@bwspenc Agree. Let's work on making changes on my local branch rather than submit small changes directly to MOOSE.

@hchen139 hchen139 merged commit 9eb0590 into hchen139:peridynamics Oct 9, 2018
@hchen139
Copy link
Owner

hchen139 commented Oct 9, 2018

I merged this pull request so that I can work on to address those issue myself.

hchen139 pushed a commit that referenced this pull request Apr 10, 2019
…derivative_test.i but with AD. Agrees well (#2)
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