Skip to content

Commit

Permalink
Modifications based on review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mnabideltares committed Apr 25, 2024
1 parent 491de4f commit 1711f5d
Show file tree
Hide file tree
Showing 36 changed files with 32 additions and 499 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) TransientPwLineElement : public Elem
void CheckProperty(const Kratos::Variable<double>& rVariable) const
{
KRATOS_ERROR_IF_NOT(GetProperties().Has(rVariable))
<< rVariable.Name() << " does not exist in the thermal element's properties" << std::endl;
<< rVariable.Name() << " does not exist in the pressure element's properties" << std::endl;
KRATOS_ERROR_IF(GetProperties()[rVariable] < 0.0)
<< rVariable.Name() << " has an invalid value at element " << Id() << std::endl;
}

void CheckProperty(const Kratos::Variable<std::string>& rVariable, const std::string& rName) const
{
KRATOS_ERROR_IF_NOT(GetProperties().Has(rVariable))
<< rVariable.Name() << " does not exist in the thermal element's properties" << std::endl;
<< rVariable.Name() << " does not exist in the pressure element's properties" << std::endl;
KRATOS_ERROR_IF_NOT(GetProperties()[rVariable] == rName)
<< rVariable.Name() << " has a value of (" << GetProperties()[rVariable]
<< ") instead of (" << rName << ") at element " << Id() << std::endl;
Expand Down Expand Up @@ -293,15 +293,12 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) TransientPwLineElement : public Elem
const auto& r_properties = GetProperties();
const double biot_coefficient = r_properties[BIOT_COEFFICIENT];

double result = 0.0;
double bulk_fluid = TINY;
if (!r_properties[IGNORE_UNDRAINED]) {
result = (biot_coefficient - r_properties[POROSITY]) / r_properties[BULK_MODULUS_SOLID]
+ r_properties[POROSITY] / r_properties[BULK_MODULUS_FLUID];
bulk_fluid = r_properties[BULK_MODULUS_FLUID];
}
else {
result = (biot_coefficient - r_properties[POROSITY]) / r_properties[BULK_MODULUS_SOLID]
+ r_properties[POROSITY] / TINY;
}
double result = (biot_coefficient - r_properties[POROSITY]) / r_properties[BULK_MODULUS_SOLID] +
r_properties[POROSITY] / bulk_fluid;

RetentionLaw::Parameters RetentionParameters(GetProperties(), rCurrentProcessInfo);
const double degree_of_saturation = mRetentionLawVector[integrationPointIndex]->CalculateSaturation(RetentionParameters);
Expand Down Expand Up @@ -362,34 +359,19 @@ class KRATOS_API(GEO_MECHANICS_APPLICATION) TransientPwLineElement : public Elem
GeoElementUtilities::InterpolateVariableWithComponents<TDim, TNumNodes>(
body_acceleration, rNContainer, volume_acceleration, integration_point_index);

array_1d<double, TDim> tangent_vector = CalculateTangentialElementUnitVectorOnIntegrationPoint(integration_point_index, J_container);
array_1d<double, TDim> tangent_vector = column(J_container[integration_point_index], 0);
array_1d<double, 1> projected_gravity = ZeroVector(1);
projected_gravity(0) = MathUtils<double>::Dot(tangent_vector, body_acceleration);
const auto N = Vector{row(rNContainer, integration_point_index)};
double RelativePermeability = mRetentionLawVector[integration_point_index]->CalculateRelativePermeability(RetentionParameters);
fluid_body_vector += r_properties[DENSITY_WATER] / r_properties[DYNAMIC_VISCOSITY] * RelativePermeability
fluid_body_vector += r_properties[DENSITY_WATER] * RelativePermeability
* prod(prod(rShapeFunctionGradients[integration_point_index], constitutive_matrix), projected_gravity) *
rIntegrationCoefficients[integration_point_index];
rIntegrationCoefficients[integration_point_index] / r_properties[DYNAMIC_VISCOSITY];
}
return fluid_body_vector;
}


array_1d<double, TDim> CalculateTangentialElementUnitVectorOnIntegrationPoint(
const unsigned int integrationPointIndex,
const GeometryType::JacobiansType& rJContainer) const
{
array_1d<double, TDim> result;
if constexpr (TDim == 2) {
result = column(rJContainer[integrationPointIndex], 0);
}
else if constexpr (TDim == 3) {
MathUtils<double>::CrossProduct(result, column(rJContainer[integrationPointIndex], 0), column(rJContainer[integrationPointIndex], 1));
}
return result;
}


[[nodiscard]] DofsVectorType GetDofs() const
{
return Geo::DofUtilities::ExtractDofsFromNodes(GetGeometry(), WATER_PRESSURE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,10 @@
"BULK_MODULUS_FLUID" : 1.000000e+20,
"PERMEABILITY_XX" : 9.084000e-06,
"DYNAMIC_VISCOSITY" : 1.000000e-03,
"THICKNESS" : 1.000000e+00,
"BIOT_COEFFICIENT" : 1.000000e+00,
"RETENTION_LAW" : "SaturatedLaw",
"SATURATED_SATURATION" : 1.000000e+00,
"RESIDUAL_SATURATION" : 0.000000e+00,
"VAN_GENUCHTEN_AIR_ENTRY_PRESSURE" : 0.000000e+00,
"VAN_GENUCHTEN_GN" : 0.000000e+00,
"VAN_GENUCHTEN_GL" : 0.000000e+00,
"MINIMUM_RELATIVE_PERMEABILITY" : 0.000000e+00,
"TRANSVERSAL_PERMEABILITY" : 9.084000e-06
"RESIDUAL_SATURATION" : 0.000000e+00
},
"Tables": {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@
"BULK_MODULUS_FLUID" : 1.000000e+20,
"PERMEABILITY_XX" : 9.084000e-06,
"DYNAMIC_VISCOSITY" : 1.000000e-03,
"THICKNESS" : 1.000000e+00,
"BIOT_COEFFICIENT" : 1.000000e+00,
"RETENTION_LAW" : "SaturatedLaw",
"SATURATED_SATURATION" : 1.000000e+00,
"RESIDUAL_SATURATION" : 0.000000e+00,
"VAN_GENUCHTEN_AIR_ENTRY_PRESSURE" : 0.000000e+00,
"VAN_GENUCHTEN_GN" : 0.000000e+00,
"VAN_GENUCHTEN_GL" : 0.000000e+00,
"MINIMUM_RELATIVE_PERMEABILITY" : 0.000000e+00,
"TRANSVERSAL_PERMEABILITY" : 9.084000e-06
"SATURATED_SATURATION" : 1.000000e+00
},
"Tables": {
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"input_filename" : "test_oblique_line_element2D2N"
},
"material_import_settings" : {
"materials_filename" : "MaterialParameters.json"
"materials_filename" : "../Common/MaterialParameters2D.json"
},
"time_stepping" : {
"time_step" : 3.600,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,6 @@ Begin SubModelPart top
End SubModelPart


Begin SubModelPart bottom
Begin SubModelPartTables
End SubModelPartTables
Begin SubModelPartNodes
4
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart


Begin SubModelPart Gravity
Begin SubModelPartTables
End SubModelPartTables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"input_filename" : "test_oblique_line_element2D3N"
},
"material_import_settings" : {
"materials_filename" : "MaterialParameters.json"
"materials_filename" : "../Common/MaterialParameters2D.json"
},
"time_stepping" : {
"time_step" : 3.600,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,6 @@ Begin SubModelPart top
End SubModelPart


Begin SubModelPart bottom
Begin SubModelPartTables
End SubModelPartTables
Begin SubModelPartNodes
4
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart


Begin SubModelPart Gravity
Begin SubModelPartTables
End SubModelPartTables
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"input_filename" : "test_oblique_line_element2D4N"
},
"material_import_settings" : {
"materials_filename" : "MaterialParameters.json"
"materials_filename" : "../Common/MaterialParameters2D.json"
},
"time_stepping" : {
"time_step" : 3.600,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,6 @@ Begin SubModelPart top
End SubModelPart


Begin SubModelPart bottom
Begin SubModelPartTables
End SubModelPartTables
Begin SubModelPartNodes
4
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart


Begin SubModelPart Gravity
Begin SubModelPartTables
End SubModelPartTables
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"input_filename" : "test_oblique_line_element2D5N"
},
"material_import_settings" : {
"materials_filename" : "MaterialParameters.json"
"materials_filename" : "../Common/MaterialParameters2D.json"
},
"time_stepping" : {
"time_step" : 3.600,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,6 @@ Begin SubModelPart top
End SubModelPart


Begin SubModelPart bottom
Begin SubModelPartTables
End SubModelPartTables
Begin SubModelPartNodes
4
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart


Begin SubModelPart Gravity
Begin SubModelPartTables
End SubModelPartTables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"solver_settings" : {
"solver_type" : "Pw",
"model_part_name" : "PorousDomain",
"domain_size" : 2,
"domain_size" : 3,
"model_import_settings" : {
"input_type" : "mdpa",
"input_filename" : "test_oblique_line_element3D2N"
},
"material_import_settings" : {
"materials_filename" : "MaterialParameters.json"
"materials_filename" : "../Common/MaterialParameters3D.json"
},
"time_stepping" : {
"time_step" : 3.600,
Expand Down
Loading

0 comments on commit 1711f5d

Please sign in to comment.