-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add new scaling parameters for the Cahn-Hilliard model #1274
Conversation
@@ -353,7 +353,8 @@ namespace Parameters | |||
void | |||
declare_parameters(ParameterHandler &prm); | |||
void | |||
parse_parameters(ParameterHandler &prm); | |||
parse_parameters(ParameterHandler &prm, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it was not there initially, but you could add the briefs
{ | ||
surface_tension_coefficient = prm.get_double("surface tension coefficient"); | ||
T_0 = prm.get_double("reference state temperature"); | ||
surface_tension_coefficient *= dimensions.surface_tension_scaling; | ||
T_0 = prm.get_double("reference state temperature"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T_0 should be scale also I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't the dimensions multiplied in the same line?
source/core/parameters.cc
Outdated
surface_tension_parameters.parse_parameters(prm, dimensions); | ||
} | ||
else if (op == "linear") | ||
{ | ||
surface_tension_model = SurfaceTensionModel::linear; | ||
surface_tension_parameters.parse_parameters(prm); | ||
surface_tension_parameters.parse_parameters(prm, dimensions); | ||
} | ||
else if (op == "phase change") | ||
{ | ||
surface_tension_model = SurfaceTensionModel::phase_change; | ||
surface_tension_parameters.parse_parameters(prm); | ||
surface_tension_parameters.parse_parameters(prm, dimensions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just call the parse_parameters once after the if/else ifs/else? Same for CH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No comments. Is this PR missing any point on the checklist? If not, I have nothing to add.
{ | ||
surface_tension_coefficient = prm.get_double("surface tension coefficient"); | ||
T_0 = prm.get_double("reference state temperature"); | ||
surface_tension_coefficient *= dimensions.surface_tension_scaling; | ||
T_0 = prm.get_double("reference state temperature"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't the dimensions multiplied in the same line?
25e2271
to
e2ff3c0
Compare
@PierreLaurentinCS can you update the change log? |
…#1274) Description With new models come new parameters that need to be dimensionalised adequately when changing the units in the "Dimensionality" section of the parameter file. With the Cahn-Hilliard model, it was the mobility coefficient, the interface thickness and the surface tension. Three new scalings were added at first, for those three parameters. Since surface tension is also used in VOF model, a fourth scaling parameter was added for the surface tension gradient for completion. There was a mistake in the scaling of thermal expansion which was corrected. Testing No testing because it would imply coding an output for the physical properties which is unnecessary. It works fine. Former-commit-id: 46511be
Description With new models come new parameters that need to be dimensionalised adequately when changing the units in the "Dimensionality" section of the parameter file. With the Cahn-Hilliard model, it was the mobility coefficient, the interface thickness and the surface tension. Three new scalings were added at first, for those three parameters. Since surface tension is also used in VOF model, a fourth scaling parameter was added for the surface tension gradient for completion. There was a mistake in the scaling of thermal expansion which was corrected. Testing No testing because it would imply coding an output for the physical properties which is unnecessary. It works fine. Former-commit-id: 46511be
Description
With new models come new parameters that need to be dimensionalised adequately when changing the units in the "Dimensionality" section of the parameter file.
With the Cahn-Hilliard model, it was the mobility coefficient, the interface thickness and the surface tension.
Three new scalings were added at first, for those three parameters. Since surface tension is also used in VOF model, a fourth scaling parameter was added for the surface tension gradient for completion.
There was a mistake in the scaling of thermal expansion which was corrected.
Testing
No testing because it would imply coding an output for the physical properties which is unnecessary.It works fine.
Documentation
No new documentation
Checklist (will be removed when merged)
See this page for more information about the pull request process.
Code related list:
Pull request related list: