Skip to content
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

New coupling assembly computations #1970

Merged
merged 25 commits into from
Dec 5, 2017
Merged

Conversation

wenqing
Copy link
Member

@wenqing wenqing commented Oct 26, 2017

This implementation changed the coupling assembly computations from that are performed across the different Process classes to that is done within a single Process class, which is for monolithic scheme originally. With the changes, the original Process class that for monolithic scheme originally can now handle both of the monolithic and staggered schemes.

With the new implementation,

  1. coupled process class reference is removed from the coupled term class, which gets a new name of CoupledSolutionsForStaggeredScheme, this fixes #1814
  2. material properties are shared by the coupled processes within one single instance of class Process. Considered that the global solutions have already being held by class UncoupledProcessesTimeLoop, there is no need to introduce a global state space for material properties or global solutions. Because now, the material properties are encapsulated into the proper process classes whichever the monolithic scheme or the staggered scheme being applied., and the solutions are encapsulated into the family of classes of the equations system.
  3. only one DOF table and one shape function cache are created for the staggered decoupling if the modelling of the coupled processes employs the same order element.
  4. only one vtu file at the required time is created for the staggered decoupling computation instead of multiple vtu file output for all coupled processes.

The source code change is a little bit big (more than 2k lines). However, the changes are easy to follow.
For reviewing, the main changes are in:

  1. coupled term classes.
  2. class Process, ProcessVariable, ProcessOutput, and the classes in boundary conditions.
  3. project file for staggered scheme. (One can modify the project file for the monolithic scheme by just using two process definition in the element of <time_loop>).
  4. the old coupled assemblers in classes of LiquidFlow and HeatCondution are gone. LiquidFlow and HeatCondution are now for pure single process.

What is untouched is the global framework of the staggered scheme, which is in class UncoupledProcessesTimeLoop.

As a first application of this decoupling to the coupled process, the assembly classes of HT have been modified as

  1. the local assembler is re-designed into two assemblers as StaggeredHTFEM and MonolithicHTFEM, which are derived from a base class HTFEM.
  2. some material properties are changed. for example, the input of the thermal_dispersivity is set as optional, the fluid thermal expansion computation is newly added as an optional term. The reference fluid density is dropped. In the previous code, the so called reference fluid density is used in the computation of the heat capacity and the thermal_dispersivity related term. This is not corrected physically because the current fluid density value must be used for computation. I guess that the use of the reference fluid density is just to make the benchmark results being the same as what are obtained by other software.

The benchmark in HT is used to test this implementation without changing the time step sizes. Obviously, with the same time stepping, the results of the test by the staggered scheme has less accuracy than that by the monolithic scheme. See:

  1. contour plot
    contour_comparison_ht_staggeredmonolithicscheme
  2. profile along the vertical line in the middle of the domain.
    profile_comparison_ht_staggeredmonolithicscheme

The benchmarks about HT coupling in LiquidProcess will be immigrated to this implementation in the next PR.

The next changes are HydroMechanics and ThermoMechanics.

@wenqing
Copy link
Member Author

wenqing commented Nov 14, 2017

Just committed new changes, which are mainly about the the BCs, sources terms (STs) and the process variables (PV) in the coupling scheme.
Compared to the initial implementation of the BCs, STs and PVs for coupling in this PR, the BCs, STs and PVs are now categorized by process in class Process as

    std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>
        _process_variables;
    std::vector<BoundaryConditionCollection> _boundary_conditions;
    std::vector<std::vector<std::unique_ptr<NodalSourceTerm>>> _source_terms;

with which, the BCs, STs and PVs for the staggered coupling could be more flexible. For example THM could be T-H-M, TH-M, or T-HM.

@wenqing wenqing force-pushed the coupling_new branch 2 times, most recently from 7cb7ea5 to 6fc21f6 Compare November 23, 2017 15:37
endJunction added a commit that referenced this pull request Nov 23, 2017
Name change and new argument for a member function of process classes

1. Changed the names of structs,  variables that are related to the coupled terms.
2. Changed the name and the type of HTProcessData to HTMaterialProperties (std::unique_ptr).
3. Added an argument to a member function of classes of processes.
4. removed an unused include.

This PR is a part of PR #1970.
@wenqing wenqing force-pushed the coupling_new branch 7 times, most recently from 6de3812 to 15e853e Compare November 28, 2017 13:02
…embly for both of the monolithic scheme and the staggered scheme.
 from the two classes of coupled term.

[Coupling] Changed the members of the coupled term,

 which only contains the solutions of the coupled equations.
[HT] Changed the name and the type of the material property member of HT, and

took the forward declaration of the type of that member.
…or both the monolithic and staggered schemes.
…ggered scheme

that is originally for the monolithic scheme.
…e (for PETSc)

 and added a OGS_FATAL checking for the global vector of the solution of
 the previous time step
 in creating of the instances of classes of coupled processes.
…gered scheme

and removed the tests for the staggered scheme from LiquidFlow temporarily.
@wenqing wenqing force-pushed the coupling_new branch 2 times, most recently from b5dd595 to bc2740c Compare December 4, 2017 15:08
Copy link
Member

@endJunction endJunction left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. If there are no further reviews coming, I'd suggest to merge it on Tuesday afternoon.

@endJunction endJunction merged commit 910c9ba into ufz:master Dec 5, 2017
@ogsbot
Copy link
Member

ogsbot commented Jun 19, 2020

OpenGeoSys development has been moved to GitLab.

See this pull request on GitLab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LiquidFlow <-> HeatConduction circular dependency
3 participants