36 #include <custom_processes/apply_component_table_process.hpp>
37 #include <custom_processes/apply_constant_hydrostatic_pressure_process.hpp>
73 static ConvergenceCriteriaType::Pointer setup_criteria_dgeoflow();
74 static LinearSolverType::Pointer setup_solver_dgeoflow();
75 static GeoMechanicsNewtonRaphsonErosionProcessStrategyType::Pointer setup_strategy_dgeoflow(
ModelPart& rModelPart);
79 double minCriticalHead = 0.0;
80 double maxCriticalHead = 0.0;
81 double stepCriticalHead = 0.0;
83 CriticalHeadInfo(
double minCriticalHead,
double maxCriticalHead,
double stepCriticalHead)
84 : minCriticalHead(minCriticalHead), maxCriticalHead(maxCriticalHead), stepCriticalHead(stepCriticalHead)
96 std::function<
void(
double)> ReportProgress,
97 std::function<
void(
const char*)> ReportTextualProgress,
98 std::function<
bool()> ShouldCancel)
99 : LogCallback(
std::move(LogCallback)),
100 ReportProgress(
std::move(ReportProgress)),
101 ReportTextualProgress(
std::move(ReportTextualProgress)),
102 ShouldCancel(
std::move(ShouldCancel))
107 int ExecuteFlowAnalysis(std::string_view WorkingDirectory,
108 const std::string& rProjectParamsFileName,
109 const CriticalHeadInfo& rCriticalHeadInfo,
110 std::string_view CriticalHeadBoundaryModelPartName,
111 const CallBackFunctions& rCallBackFunctions);
113 void ExecuteWithoutPiping(
ModelPart& rModelPart,
115 const GeoMechanicsNewtonRaphsonErosionProcessStrategyType::Pointer pSolvingStrategy)
const;
117 int ExecuteWithPiping(
ModelPart& rModelPart,
119 const CriticalHeadInfo& rCriticalHeadInfo,
120 LoggerOutput::Pointer pOutput,
121 const CallBackFunctions& rCallBackFunctions,
122 const GeoMechanicsNewtonRaphsonErosionProcessStrategyType::Pointer pSolvingStrategy);
124 void WriteCriticalHeadResultToFile()
const;
126 void AddNodalSolutionStepVariables(
ModelPart& rModelPart)
const;
128 int FindCriticalHead(
ModelPart& rModelPart,
130 const CriticalHeadInfo& rCriticalHeadInfo,
131 LoggerOutput::Pointer pOutput,
133 const GeoMechanicsNewtonRaphsonErosionProcessStrategyType::Pointer pSolvingStrategy,
134 const CallBackFunctions& rCallBackFunctions);
136 void HandleCriticalHeadFound(
const CriticalHeadInfo& rCriticalHeadInfo);
138 void HandleCleanUp(
const CallBackFunctions& rCallBackFunctions, LoggerOutput::Pointer pOutput);
144 KratosGeoMechanicsApplication::Pointer mpGeoApp;
145 std::string mWorkingDirectory;
146 std::string mCriticalHeadBoundaryModelPartName;
147 bool mPipingSuccess =
false;
148 double mCriticalHead = 0.0;
149 double mCurrentHead = 0.0;
150 std::vector<std::shared_ptr<Process>> mProcesses;
153 void ResetModelParts();
155 [[nodiscard]]
int GetEchoLevel()
const;
159 shared_ptr<Process> FindRiverBoundaryByName(
const std::string& CriticalHeadBoundaryModelPartName)
const;
162 const KratosExecute::GeoMechanicsNewtonRaphsonErosionProcessStrategyType::Pointer rpSolvingStrategy)
const;
165 const GeoMechanicsNewtonRaphsonErosionProcessStrategyType::Pointer rpSolvingStrategy,
168 unsigned int NumberOfIterations)
const;
170 bool AreExceedingMaxCriticalHead(
double CurrentHead,
double MaxCriticalHead)
const;
This is the base class to define the different convergence criterion considered.
Definition: convergence_criteria.h:58
Definition: geo_mechanics_newton_raphson_erosion_process_strategy.hpp:38
Kernel is in charge of synchronization the whole system of Kratos itself and its application.
Definition: kernel.h:53
Definition: dgeoflow.h:50
typename MixedGenericCriteriaType::ConvergenceVariableListType ConvergenceVariableListType
Definition: dgeoflow.h:65
Base class for all the linear solvers in Kratos.
Definition: linear_solver.h:65
Convergence criteria for mixed vector-scalar problems.
Definition: mixed_generic_criteria.h:42
std::vector< std::tuple< const VariableData *, TDataType, TDataType > > ConvergenceVariableListType
Definition: mixed_generic_criteria.h:61
This class aims to manage different model parts across multi-physics simulations.
Definition: model.h:60
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
A functor that serves as the identity function.
Definition: set_identity_function.h:43
Definition: skyline_lu_factorization_solver.h:562
A class template for handling data types, matrices, and vectors in a Ublas space.
Definition: ublas_space.h:121
void SetEchoLevel(const int EchoLevel)
Definition: add_custom_io_to_python.cpp:344
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
REACTION_CHECK_STIFFNESS_FACTOR INNER_LOOP_ITERATION DISTANCE_THRESHOLD ACTIVE_CHECK_FACTOR AUXILIAR_COORDINATES NORMAL_GAP WEIGHTED_GAP WEIGHTED_SCALAR_RESIDUAL bool
Definition: contact_structural_mechanics_application_variables.h:93
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
namespace
Definition: array_1d.h:793
Definition: dgeoflow.h:89
std::function< void(const char *)> ReportTextualProgress
Definition: dgeoflow.h:92
std::function< bool()> ShouldCancel
Definition: dgeoflow.h:93
std::function< void(double)> ReportProgress
Definition: dgeoflow.h:91
std::function< void(const char *)> LogCallback
Definition: dgeoflow.h:90
CallBackFunctions(std::function< void(const char *)> LogCallback, std::function< void(double)> ReportProgress, std::function< void(const char *)> ReportTextualProgress, std::function< bool()> ShouldCancel)
Definition: dgeoflow.h:95
Definition: dgeoflow.h:78
CriticalHeadInfo(double minCriticalHead, double maxCriticalHead, double stepCriticalHead)
Definition: dgeoflow.h:83