-
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
Richards Component Transport #1929
Richards Component Transport #1929
Conversation
5977bb8
to
cc043fa
Compare
cc043fa
to
3fc308b
Compare
4d5c437
to
ca5f624
Compare
23b6963
to
021992f
Compare
There is a huge ParaView state file in this PR. Can it be removed, or moved to the data repo? |
@chleh You are right, this state file should be in data... ( @TomFischer can you move this?) |
@@ -0,0 +1,3 @@ | |||
Specific body forces applied to fluid. | |||
|
|||
It is usually used to apply gravitational forces. Given as a 2d or 3d vector. |
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.
Nit picking: it's probably copy-paste, but I'd think it also applies to 1d problems...
@@ -306,6 +306,8 @@ class LocalAssemblerData : public HTLocalAssemblerInterface | |||
auto const& N = ip_data.N; | |||
auto const& dNdx = ip_data.dNdx; | |||
|
|||
pos.setIntegrationPoint(ip); |
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 can be directly be pushed to the master. Has nothing to do with Richards...
021992f
to
d28361c
Compare
cache.clear(); | ||
auto cache_vec = MathLib::createZeroedMatrix< | ||
Eigen::Matrix<double, 1, Eigen::Dynamic>>( | ||
cache, 1, n_integration_points); |
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.
Not sure if the mapping is needed, because the cache is accessed only once by index (of integration point). But you might want to keep it if this style already became idiomatic (then the mapping could be to a VectorXd
instead of a matrix).
The access below would be cache[ip] = Sw
.
SpatialPosition pos; | ||
pos.setElementID(_element_id); | ||
|
||
auto const num_nodes = ShapeFunction::NPOINTS; |
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.
Just a comment about variable naming: shape function's number of points is not always equal to the number of nodes of an element. Maybe n_points
? Feel free to ignore the suggestion.
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 some other multi variable processes, e.g. HM, there are class variables X_index and X_size for each variable X (pressure, displacement, temperature,...). Then the submatrix creation looks like:
auto KCC = local_K.template block<C_size, C_size>(C_index, C_index);
auto KCp = local_K.template block<C_size, p_size>(C_index, p_index);
Never mind. This is not a template, as Tom mentions below... Silly me ;) |
@endJunction |
NumLib::shapeFunctionInterpolate(local_x, N, C_int_pt, p_int_pt); | ||
|
||
double const pc_int_pt = -p_int_pt; | ||
double const Sw = (pc_int_pt > 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.
You can remove this ternary condition because (pc_int_pt > 0) is already checked inside
_process_data.porous_media_properties
.getCapillaryPressureSaturationModel(t, pos)
.getSaturation(pc_int_pt)
as
double BrooksCoreyCapillaryPressureSaturation::getSaturation(
const double capillary_pressure) const
{
const double pc =
(capillary_pressure < 0.0) ? _minor_offset : capillary_pressure;
...
return MathLib::limitValueInInterval(S, _saturation_r + _minor_offset,
_saturation_max - _minor_offset);
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 the hint. Changed all locations.
.getSaturation(pc_int_pt) | ||
: 1.0; | ||
|
||
double const dSw_dpc = |
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 same reason to remove this ternary condition. With the change, the benchmark results will be changed slightly if the given maximum saturation is less than 1.
|
||
// saturation | ||
double const pc_int_pt = -p_int_pt; | ||
double const Sw = (pc_int_pt > 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.
The same here
|
||
// saturation | ||
double const pc_int_pt = -p_int_pt; | ||
double const Sw = (pc_int_pt > 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.
Here, the same.
20a4868
to
b5cddcf
Compare
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.
⏩
- Copied ComponentTransport folder - Renamed ComponentTransport to RichardsComponentTransport
Change the assembly of the local matrix for the pressure Kpp.
Change the assembly of the local mass matrix for the pressure Mpp.
Change the assembly for the pressure related entries of the local right hand side.
Summarize several times used mathematical expression into a variable.
Use variables for indices and size for accessing local matrices.
b5cddcf
to
4d4ee32
Compare
OpenGeoSys development has been moved to GitLab. |
Please do not review - this PR is to test the generation of the documentation.Please review!