-
Notifications
You must be signed in to change notification settings - Fork 239
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
[MPL] Add Property based on Parameter. #2616
Conversation
So great! |
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.
👍
db37152
to
4bea79b
Compare
const double density) | ||
double getThermalExpansivity(Phase const& phase, VariableArray const& vars, | ||
const double density, | ||
ParameterLib::SpatialPosition const& pos, double t) |
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.
ParameterLib::SpatialPosition const& pos, double t) | |
ParameterLib::SpatialPosition const& pos, double const t) |
MaterialLib/MPL/CreateProperty.cpp
Outdated
@@ -170,6 +173,17 @@ std::unique_ptr<MaterialPropertyLib::Property> createProperty( | |||
reference_value, exp_data); | |||
} | |||
|
|||
if (property_type == "parameter") |
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.
parameter or Parameter? If the former, then in line 179 it should be
//! \ogs_file_param{properties__property__parameter__parameter_name}
PropertyDataType value(VariableArray const& variable_array) const override; | ||
PropertyDataType value(VariableArray const& variable_array, | ||
ParameterLib::SpatialPosition const& pos, | ||
double t) const override; |
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.
double t) const override; | |
double const t) const override; |
PropertyDataType ParameterProperty::value( | ||
VariableArray const& /*variable_array*/, | ||
ParameterLib::SpatialPosition const& pos, | ||
double t) const |
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.
double t) const | |
double const t) const |
MaterialLib/MPL/Property.h
Outdated
T value(VariableArray const& variable_array) const | ||
T value(VariableArray const& variable_array, | ||
ParameterLib::SpatialPosition const& pos, | ||
double t) const |
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.
double t) const | |
double const t) const |
ProcessLib/HT/HTFEM.h
Outdated
const double specific_heat_capacity_fluid) | ||
MaterialPropertyLib::VariableArray const& vars, const double porosity, | ||
const double fluid_density, const double specific_heat_capacity_fluid, | ||
ParameterLib::SpatialPosition const& pos, double t) |
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.
ParameterLib::SpatialPosition const& pos, double t) | |
ParameterLib::SpatialPosition const& pos, double const t) |
<property> | ||
<name>density</name> | ||
<type>parameter</type> | ||
<parameter_name>rho_solid</parameter_name> |
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.
For discussion:
Could be also
<property>
<name>density</name>
<parameter>rho_solid</parameter>
</property>
What do you think?
@TomFischer I know, the parsing is slightly more difficult.
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.
The advantage of your variant is a non-redundant, short description of a ParameterProperty
object. The advantage of the implementation of the PR is that it is consistent with the specification of other parameter types.
@wenqing, @renchao-lu, @ErikNixdorf , @WaltherM Opinions?
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 think that it is better to have the consistency with other types of input. Therefore I prefer to take the present one in this PR.
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.
In my mind, there are three types of property offered by far as follows: constant, linear dependency, and exponential dependency. I guess the initial design of the tag <type>
intends to establish property dependency linking to primary process variables which will change over time. If a material property is not time-dependent, we assign the tag to constant. Otherwise, we assign to linear/exponential dependency. As to ParameterLib, I think the major business of ParameterLib is to tackle spatial heterogeneity, although it offers some time-associated functionalities. For this main reason, ParameterLib has its own tag for property type: function, group, meshnode, and meshelement (for spatial heterogeneity), curvescaled, and timedependentheterogeneousparameter (for time-dependency).
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 would vote for @TomFischer implementation, which seems more consistent with the existing, alternative options.
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.
Thanks for discussion.
⏩
0651908
to
a84cdce
Compare
a84cdce
to
c626c06
Compare
ProcessLib/HT/HTFEM.h
Outdated
@@ -199,7 +198,8 @@ class HTFEM : public HTLocalAssemblerInterface | |||
GlobalDimMatrixType getThermalConductivityDispersivity( | |||
MaterialPropertyLib::VariableArray const& vars, const double porosity, | |||
const double fluid_density, const double specific_heat_capacity_fluid, | |||
const GlobalDimVectorType& velocity, const GlobalDimMatrixType& I) | |||
const GlobalDimVectorType& velocity, const GlobalDimMatrixType& I, | |||
ParameterLib::SpatialPosition const& pos, double t) |
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.
ParameterLib::SpatialPosition const& pos, double t) | |
ParameterLib::SpatialPosition const& pos, double const t) |
c626c06
to
4ea7df2
Compare
OpenGeoSys development has been moved to GitLab. |
PR implements a new Property based on Parameter. With this implementation spatial heterogeneous properties are available now.
The disabled HT decovalex test was re-enable.