https://gitlab.opengeosys.org/ogs/ogs.git
Revision 69ca768c760c492caa2a825fea3b9e22fa5d4c69 authored by Dmitri Naumov on 04 October 2023, 08:29:10 UTC, committed by Dmitri Naumov on 05 October 2023, 13:14:07 UTC
Presence of ice phase at slightly positive temperatures with shallow
sigmoid function for ice phase should not affect the results much but
only for amount of ice formed. In the simulation the initial ice volume
fraction is 0.0379... . Displacement and stress are read from previous
simulation's steady-state result.

Incorrect update of phi_fr_prev causes pressure to drop significantly in
the first step, which is unexpected, since everything is in equilibrium.
Temperature load starts only after 10 steps at t=10000s.
1 parent 277410a
Raw File
Tip revision: 69ca768c760c492caa2a825fea3b9e22fa5d4c69 authored by Dmitri Naumov on 04 October 2023, 08:29:10 UTC
[T/THM] Heat transport in stationary flow w/ ice
Tip revision: 69ca768
ProcessData.h
/**
 * \file
 * \copyright
 * Copyright (c) 2012-2023, OpenGeoSys Community (http://www.opengeosys.org)
 *            Distributed under a Modified BSD License.
 *              See accompanying file LICENSE.txt or
 *              http://www.opengeosys.org/project/license
 *
 */

#pragma once

#include "CoupledSolutionsForStaggeredScheme.h"
#include "NumLib/ODESolver/NonlinearSolver.h"
#include "NumLib/ODESolver/TimeDiscretization.h"
#include "NumLib/ODESolver/Types.h"
#include "NumLib/TimeStepping/Algorithms/TimeStepAlgorithm.h"
#include "NumLib/TimeStepping/TimeStep.h"
#include "Process.h"

namespace ProcessLib
{
struct ProcessData
{
    ProcessData(
        std::unique_ptr<NumLib::TimeStepAlgorithm>&& timestep_algorithm_,
        NumLib::NonlinearSolverTag const nonlinear_solver_tag_,
        NumLib::NonlinearSolverBase& nonlinear_solver_,
        std::unique_ptr<NumLib::ConvergenceCriterion>&& conv_crit_,
        std::unique_ptr<NumLib::TimeDiscretization>&& time_disc_,
        int const process_id_, Process& process_)
        : timestep_algorithm(std::move(timestep_algorithm_)),
          timestep_previous(timestep_algorithm->begin()),
          timestep_current(timestep_previous),
          nonlinear_solver_tag(nonlinear_solver_tag_),
          nonlinear_solver(nonlinear_solver_),
          nonlinear_solver_status{true, 0},
          conv_crit(std::move(conv_crit_)),
          time_disc(std::move(time_disc_)),
          process_id(process_id_),
          process(process_)
    {
    }

    ProcessData(ProcessData&& pd) = delete;
    ProcessData& operator=(ProcessData const& pd) = delete;
    ProcessData& operator=(ProcessData&& pd) = delete;

    std::unique_ptr<NumLib::TimeStepAlgorithm> timestep_algorithm;
    NumLib::TimeStep timestep_previous;
    NumLib::TimeStep timestep_current;

    //! Tag containing the missing type information necessary to cast the
    //! other members of this struct to their concrety types.
    NumLib::NonlinearSolverTag const nonlinear_solver_tag;
    NumLib::NonlinearSolverBase& nonlinear_solver;
    NumLib::NonlinearSolverStatus nonlinear_solver_status;
    std::unique_ptr<NumLib::ConvergenceCriterion> conv_crit;

    std::unique_ptr<NumLib::TimeDiscretization> time_disc;
    //! type-erased time-discretized ODE system
    std::unique_ptr<NumLib::EquationSystem> tdisc_ode_sys;

    int const process_id;

    Process& process;
};

void setEquationSystem(ProcessData const& process_data);

}  // namespace ProcessLib
back to top