-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Wellbore_Simulator' into 'master'
Add the WellboreSimulator process See merge request ogs/ogs!4481
- Loading branch information
Showing
53 changed files
with
2,842 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ons/boundary_condition/WellboreCompensateNeumann/c_WellboreCompensateNeumann.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Declares a compensated Neumann boundary condition of the Dirichlet boundary | ||
condition in the wellbore simulator process. |
2 changes: 2 additions & 0 deletions
2
...nditions/boundary_condition/WellboreCompensateNeumann/t_coefficient_enthalpy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Defines the Neumann boundary condition for the first variable, i.e., enthalpy. | ||
When it is activated, the value gives 1 (out of the domain), otherwise it is 0. |
2 changes: 2 additions & 0 deletions
2
...nditions/boundary_condition/WellboreCompensateNeumann/t_coefficient_pressure.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Defines the Neumann boundary condition for the first variable, i.e., pressure. | ||
When it is activated, the value gives 1 (out of the domain), otherwise it is 0. |
2 changes: 2 additions & 0 deletions
2
...nditions/boundary_condition/WellboreCompensateNeumann/t_coefficient_velocity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Defines the Neumann boundary condition for the second variable, i.e., velocity. | ||
When it is activated, the value gives 1 (out of the domain), otherwise it is 0. |
1 change: 1 addition & 0 deletions
1
...on/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/c_WELLBORE_SIMULATOR.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
\copydoc ProcessLib::WellboreSimulator::WellboreSimulatorProcess |
1 change: 1 addition & 0 deletions
1
...j/processes/process/WELLBORE_SIMULATOR/process_variables/i_process_variables.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The process variables for pressure, velocity, and enthalpy. |
1 change: 1 addition & 0 deletions
1
...ctFile/prj/processes/process/WELLBORE_SIMULATOR/process_variables/t_enthalpy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The total enthalpy of the wellbore. |
1 change: 1 addition & 0 deletions
1
...ctFile/prj/processes/process/WELLBORE_SIMULATOR/process_variables/t_pressure.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Pressure for the wellbore. |
1 change: 1 addition & 0 deletions
1
...ctFile/prj/processes/process/WELLBORE_SIMULATOR/process_variables/t_velocity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Mix velocity of the wellbore. |
4 changes: 4 additions & 0 deletions
4
...esses/process/WELLBORE_SIMULATOR/reservoir_properties/i_reservoir_properties.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
The properties of the conceptual reservoir when considering the conductive heat exchange with the wellbore. | ||
|
||
For further information, refer to the implementation of the semi-analytical solution and to the following | ||
publication \cite zhang2011time |
1 change: 1 addition & 0 deletions
1
...File/prj/processes/process/WELLBORE_SIMULATOR/reservoir_properties/t_density.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the density of the surrounding reservoir. |
1 change: 1 addition & 0 deletions
1
...ile/prj/processes/process/WELLBORE_SIMULATOR/reservoir_properties/t_pressure.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the hydraulic pressure of the surrounding reservoir. |
1 change: 1 addition & 0 deletions
1
...ses/process/WELLBORE_SIMULATOR/reservoir_properties/t_specific_heat_capacity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the specific heat capacity of the surrounding reservoir. |
1 change: 1 addition & 0 deletions
1
.../prj/processes/process/WELLBORE_SIMULATOR/reservoir_properties/t_temperature.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the far-field temperature of the surrounding reservoir. |
1 change: 1 addition & 0 deletions
1
...esses/process/WELLBORE_SIMULATOR/reservoir_properties/t_thermal_conductivity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the thermal conductivity of the surrounding reservoir. |
4 changes: 4 additions & 0 deletions
4
...File/prj/processes/process/WELLBORE_SIMULATOR/t_heat_exchange_with_formation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
It defines if the conductive heat exchange with surrounding formation is | ||
considered. | ||
|
||
The default is false. |
2 changes: 2 additions & 0 deletions
2
...on/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/t_productivity_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
It defines the productivity index of the wellbore to quantify the heat and mass | ||
exchange with the feed zones. |
3 changes: 3 additions & 0 deletions
3
...n/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/t_specific_body_force.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Specific body forces applied to fluid. | ||
|
||
It is usually used to apply gravitational forces. |
1 change: 1 addition & 0 deletions
1
...ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/t_wellbore_ref_enthalpy.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the referenced enthalpy of the wellbore at the initial state. |
1 change: 1 addition & 0 deletions
1
...ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/t_wellbore_ref_pressure.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
It is the referenced pressure of the wellbore at the initial state. |
1 change: 1 addition & 0 deletions
1
...ion/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/wellbore/i_wellbore.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Defines the wellbore geometry. |
1 change: 1 addition & 0 deletions
1
...ectFile/prj/processes/process/WELLBORE_SIMULATOR/wellbore/t_casing_thickness.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Casing thickness in the wellbore. |
1 change: 1 addition & 0 deletions
1
...ion/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/wellbore/t_diameter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Wellbore diameter. |
1 change: 1 addition & 0 deletions
1
...ation/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/wellbore/t_length.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Wellbore length. |
1 change: 1 addition & 0 deletions
1
...ojectFile/prj/processes/process/WELLBORE_SIMULATOR/wellbore/t_pipe_thickness.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The pipe thickness inside the wellbore. |
1 change: 1 addition & 0 deletions
1
...on/ProjectFile/prj/processes/process/WELLBORE_SIMULATOR/wellbore/t_roughness.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Roughness of the wellbore. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
ProcessLib/BoundaryConditionAndSourceTerm/WellboreCompensateNeumannBoundaryCondition.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/** | ||
* \file | ||
* \copyright | ||
* Copyright (c) 2012-2024, OpenGeoSys Community (http://www.opengeosys.org) | ||
* Distributed under a Modified BSD License. | ||
* See accompanying file LICENSE.txt or | ||
* http://www.opengeosys.org/project/license | ||
* | ||
*/ | ||
|
||
#include "WellboreCompensateNeumannBoundaryCondition.h" | ||
|
||
#include "MaterialLib/MPL/CreateMaterialSpatialDistributionMap.h" | ||
#include "ParameterLib/Utils.h" | ||
|
||
namespace ProcessLib | ||
{ | ||
std::unique_ptr<WellboreCompensateNeumannBoundaryCondition> | ||
createWellboreCompensateNeumannBoundaryCondition( | ||
BaseLib::ConfigTree const& config, MeshLib::Mesh const& bc_mesh, | ||
NumLib::LocalToGlobalIndexMap const& dof_table, int const variable_id, | ||
int const component_id, unsigned const integration_order, | ||
unsigned const shapefunction_order, unsigned const global_dim, | ||
std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) | ||
{ | ||
DBUG("Constructing WellboreCompensateNeumann BC from config."); | ||
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__type} | ||
config.checkConfigParameter("type", "WellboreCompensateNeumann"); | ||
if (dof_table.getNumberOfVariables() != 3) | ||
{ | ||
OGS_FATAL( | ||
"WellboreCompensateNeumann BC only implemented for the " | ||
"WellboreSimulator processes."); | ||
} | ||
assert(variable_id == 0 || variable_id == 1 || variable_id == 2); | ||
|
||
if (bc_mesh.getDimension() + 1 != global_dim) | ||
{ | ||
OGS_FATAL( | ||
"The dimension ({:d}) of the given boundary mesh '{:s}' is not by " | ||
"one " | ||
"lower than the bulk dimension ({:d}).", | ||
bc_mesh.getDimension(), bc_mesh.getName(), global_dim); | ||
} | ||
|
||
auto const pressure_coefficient = | ||
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__WellboreCompensateNeumann__coefficient_pressure} | ||
config.getConfigParameter<double>("coefficient_pressure"); | ||
|
||
auto const velocity_coefficient = | ||
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__WellboreCompensateNeumann__coefficient_velocity} | ||
config.getConfigParameter<double>("coefficient_velocity"); | ||
|
||
auto const enthalpy_coefficient = | ||
//! \ogs_file_param{prj__process_variables__process_variable__boundary_conditions__boundary_condition__WellboreCompensateNeumann__coefficient_enthalpy} | ||
config.getConfigParameter<double>("coefficient_enthalpy"); | ||
|
||
auto const pressure_id = 0; | ||
auto const velocity_id = 1; | ||
auto const enthalpy_id = 2; | ||
|
||
std::vector<MeshLib::Node*> const& bc_nodes = bc_mesh.getNodes(); | ||
MeshLib::MeshSubset bc_mesh_subset(bc_mesh, bc_nodes); | ||
auto dof_table_boundary_pressure = dof_table.deriveBoundaryConstrainedMap( | ||
pressure_id, {component_id}, std::move(bc_mesh_subset)); | ||
auto dof_table_boundary_velocity = dof_table.deriveBoundaryConstrainedMap( | ||
velocity_id, {component_id}, std::move(bc_mesh_subset)); | ||
auto dof_table_boundary_enthalpy = dof_table.deriveBoundaryConstrainedMap( | ||
enthalpy_id, {component_id}, std::move(bc_mesh_subset)); | ||
|
||
// | ||
// maybe the boundary mesh needs material ids | ||
auto media_map = MaterialPropertyLib::createMaterialSpatialDistributionMap( | ||
media, bc_mesh); | ||
|
||
return std::make_unique<WellboreCompensateNeumannBoundaryCondition>( | ||
integration_order, shapefunction_order, dof_table, variable_id, | ||
component_id, global_dim, bc_mesh, | ||
WellboreCompensateNeumannBoundaryConditionData{ | ||
pressure_coefficient, velocity_coefficient, enthalpy_coefficient, | ||
std::move(dof_table_boundary_pressure), | ||
std::move(dof_table_boundary_velocity), | ||
std::move(dof_table_boundary_enthalpy), std::move(media_map)}); | ||
} | ||
|
||
} // namespace ProcessLib |
33 changes: 33 additions & 0 deletions
33
ProcessLib/BoundaryConditionAndSourceTerm/WellboreCompensateNeumannBoundaryCondition.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* \file | ||
* \copyright | ||
* Copyright (c) 2012-2024, 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 "GenericNaturalBoundaryCondition.h" | ||
#include "MaterialLib/MPL/MaterialSpatialDistributionMap.h" | ||
#include "MeshLib/PropertyVector.h" | ||
#include "WellboreCompensateNeumannBoundaryConditionLocalAssembler.h" | ||
|
||
namespace ProcessLib | ||
{ | ||
using WellboreCompensateNeumannBoundaryCondition = | ||
GenericNaturalBoundaryCondition< | ||
WellboreCompensateNeumannBoundaryConditionData, | ||
WellboreCompensateNeumannBoundaryConditionLocalAssembler>; | ||
|
||
std::unique_ptr<WellboreCompensateNeumannBoundaryCondition> | ||
createWellboreCompensateNeumannBoundaryCondition( | ||
BaseLib::ConfigTree const& config, MeshLib::Mesh const& bc_mesh, | ||
NumLib::LocalToGlobalIndexMap const& dof_table, int const variable_id, | ||
int const component_id, unsigned const integration_order, | ||
unsigned const shapefunction_order, unsigned const global_dim, | ||
std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media); | ||
|
||
} // namespace ProcessLib |
Oops, something went wrong.