-
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
Implementation of HC process #1758
Conversation
812f833
to
e4595c9
Compare
b30e0a0
to
a7bb07e
Compare
338866e
to
b84b66d
Compare
p_nodal_values); | ||
|
||
double const velocity_magnitude = velocity.norm(); | ||
GlobalDimMatrixType const& I( |
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 definition, GlobalDimMatrixType const& I, can be moved to before the start of this loop. ✅
auto const retardation_factor = | ||
_process_data.retardation_factor(t, pos)[0]; | ||
|
||
auto KCC = local_K.template block<num_nodes, num_nodes>(0, 0); |
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.
It is possible to move lines 183 to 189 about the matrix blocks before the start of the integration loop? ✅
PorousMediaProperties porous_media_properties{ | ||
createPorousMediaProperties(mesh, porous_medium_configs)}; | ||
|
||
//! \ogs_file_param{prj__processes__process__ComponentTransport__fluid} |
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.
Suggest to use class FluidProperties, which contains density, viscosity, specific heat capacity and thermal conductivity (optional). There is a creator for FluidProperties, please see
https://github.com/ufz/ogs/blob/master/ProcessLib/LiquidFlow/CreateLiquidFlowMaterialProperties.cpp#L49
{ | ||
namespace ComponentTransport | ||
{ | ||
PorousMediaProperties createPorousMediaProperties( |
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.
👍 . This class can be general one for all fluid flow processes. After this PR merged, I may refractory the other flow processes by using this class to reduce the source code duplication about porous medium among process classes.
void operator=(ComponentTransportProcessData&&) = delete; | ||
|
||
PorousMediaProperties porous_media_properties; | ||
std::unique_ptr<MaterialLib::Fluid::FluidProperty> viscosity_model; |
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.
As the comment given about, you can replace
std::unique_ptr<MaterialLib::Fluid::FluidProperty> viscosity_model;
std::unique_ptr<MaterialLib::Fluid::FluidProperty> fluid_density;
with
const std::unique_ptr<MaterialLib::Fluid::FluidProperties>
_fluid_properties;
Here is an example to use FluidProperties:
https://github.com/ufz/ogs/blob/master/ProcessLib/LiquidFlow/LiquidFlowMaterialProperties.cpp#L75
b84b66d
to
6cd41b0
Compare
I compared the run times on my laptop with and without the last commit (c0bfb08). The previous version (without |
@TomFischer If the fluid properties do not depend on density, the extra operation to access members of individual fluid property class is to access an entry of the property array
class FluidProperties enables the temperature density dependent fluid property models, e.g. WaterViscosityIAPWS. |
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.
👍
c0bfb08
to
d249206
Compare
@@ -22,7 +22,8 @@ enum class PropertyVariableType | |||
T = 0, ///< temperature. | |||
p = 1, ///< pressure. | |||
rho = p, ///< density. For some models, rho substitutes p | |||
number_of_variables = 2 ///< Number of property variables. | |||
C = 2, |
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.
short comment
MaterialLib::Fluid::PropertyVariableType::C)] = C_int_pt; | ||
vars[static_cast<int>( | ||
MaterialLib::Fluid::PropertyVariableType::p)] = p_int_pt; | ||
auto const density_water = _process_data.fluid_properties->getValue( |
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.
better to call it density_fluid (or simply density, if there is no other), it's not always water...
_process_data.fluid_properties->getValue( | ||
MaterialLib::Fluid::FluidPropertyType::Viscosity, vars); | ||
|
||
GlobalDimMatrixType const perm_over_visc = |
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.
Better to call it K_over_mu as it is done below.
std::move(porous_media_properties), | ||
// std::move(viscosity_model), | ||
fluid_reference_density, | ||
// std::move(fluid_density), |
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.
drop the comments or explain why needed
permeability_conf)); | ||
|
||
// Parameter for the specific storage. | ||
auto const& storage_conf = |
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.
typo: config ;)
and the comment above is misleading...
double t, SpatialPosition const& pos) const; | ||
|
||
Eigen::MatrixXd const& getIntrinsicPermeability(double t, | ||
SpatialPosition const& pos) 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.
maybe formatting... git clang-format ufz/master
is good!
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.
Looks promising.
In the assembly part I'd maybe try to extract special functions for velocity computation etc....
f161f44
to
d01724f
Compare
d01724f
to
9c8bc69
Compare
9c8bc69
to
4589c3c
Compare
OpenGeoSys development has been moved to GitLab. |
Missing things:
Documentation of benchmarksMarc is working on this, however code review can start.For discussion:
HC
orComponentTransport
or ...Update Changing the default search length breaks the benchmark 'ogs-TES_zeolite_discharge_small'. So I removed the commit.