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

feat: Transmissibility output #3091

Merged
merged 86 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
e1ca063
added transmissibility unit
MelReyCG Apr 24, 2024
3aa9701
Added Cell-To-Cell output
MelReyCG Apr 24, 2024
8880a0c
generated docs
MelReyCG Apr 24, 2024
8ae44d1
uncrustify
MelReyCG Apr 25, 2024
837feea
Reorganized functions / methods
MelReyCG Apr 25, 2024
44f38d7
removed old method version
MelReyCG Apr 25, 2024
6dded4b
Add the logLevel viewkey & description (cherrypick from feature/rey/s…
MelReyCG Apr 25, 2024
10ca879
added wrapper descriptions
MelReyCG Apr 25, 2024
e077668
logLevel refactor generated documentation
MelReyCG Apr 25, 2024
14e96e0
Refactor the StencilOutput so the PackCollection can read it.
MelReyCG Jun 13, 2024
d11eebe
Changing the Problem sub-groups init order so the outputs are at the …
MelReyCG Jun 13, 2024
2cb99f3
Joining an uml diagram of the stencil architecture.
MelReyCG Jun 13, 2024
1c15439
Merge remote-tracking branch 'origin/develop' into feature/rey/transm…
MelReyCG Jun 13, 2024
736b706
loglevel viewkeystruct adjustments
MelReyCG Jun 20, 2024
a9c2fab
Solved a bug where datasets were duplicated in the hdf5
MelReyCG Jun 20, 2024
06cb7f3
Merge remote-tracking branch 'origin/develop' into feature/rey/transm…
MelReyCG Jun 24, 2024
c5df35b
completing merge
MelReyCG Jun 24, 2024
7ca6b2d
completing merge
MelReyCG Jul 2, 2024
763ba5c
adressing a few review comments
MelReyCG Jul 2, 2024
91134c9
adding a side note
MelReyCG Jul 3, 2024
339a5db
continuing wip
MelReyCG Jul 3, 2024
56f280d
CellToCellDataCollection don't support multiple mesh discretization f…
MelReyCG Jul 4, 2024
5aebddd
Merge commit 'c5df35bbf68888cbea60702c1b707a184648e7b7' into feature/…
MelReyCG Jul 4, 2024
f51665e
Revert unrelated modifications
MelReyCG Jul 4, 2024
a3d1dfc
Adding unit test (has an issue for now)
MelReyCG Jul 5, 2024
9a54196
Merge branch 'feature/rey/transmissibilityOutput' of https://github.c…
MelReyCG Jul 5, 2024
5125104
fixing unit test expectations
MelReyCG Jul 8, 2024
432669d
generated files
MelReyCG Jul 8, 2024
748da47
unit test documentation
MelReyCG Jul 8, 2024
b894e68
unit test slight refactor to improve code clarity
MelReyCG Jul 8, 2024
abc9475
Adding a test where cell size is different for each axis
MelReyCG Jul 8, 2024
e423a76
optimising test + clearing debug logging
MelReyCG Jul 8, 2024
ab3bc1a
Changed the way to get mesh & discretization objects
MelReyCG Jul 15, 2024
f87de86
Translated forgotten french notes
MelReyCG Jul 15, 2024
ea30ba2
bugfix
MelReyCG Jul 15, 2024
b6bd5d3
unit test adaptations
MelReyCG Jul 15, 2024
b4aa625
Merge commit 'a7ddc53638bc37ac1927904e0c1d4e4dad754cda' into feature/…
MelReyCG Jul 15, 2024
c13b90e
postProcessInput -> postInputInitialization
MelReyCG Jul 15, 2024
6d6718f
Merge branch 'develop' into feature/rey/transmissibilityOutput
rrsettgast Jul 15, 2024
579c961
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 19, 2024
d4f35e9
update submodule
MelReyCG Jul 19, 2024
aace4ec
🐛 exposing members for CUDA kernel compilation
MelReyCG Jul 19, 2024
49c44da
gpu bugfix: removing accessing by function
MelReyCG Jul 22, 2024
92f79f0
update submodules
MelReyCG Jul 22, 2024
efd4cc6
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 22, 2024
e797afb
Merge branch 'develop' into fileIO-refactor-start
MelReyCG Jul 22, 2024
5b97dc6
removing host calls from host-device
MelReyCG Jul 22, 2024
0099b6c
📦 generated files update
MelReyCG Jul 22, 2024
0b1df04
removing full context for simple loggings
MelReyCG Jul 23, 2024
d542326
Joining an exemple to illustrate how to use the component.
MelReyCG Jul 23, 2024
117ff6b
todos
MelReyCG Jul 23, 2024
c1232af
adding some info to error message
MelReyCG Jul 23, 2024
9801cb6
code style + more info in kernel error msg
MelReyCG Jul 23, 2024
cac3f42
temporary debug info
MelReyCG Jul 23, 2024
e6e691f
adding more temporary debug info
MelReyCG Jul 23, 2024
db69a2c
adding more debug info
MelReyCG Jul 23, 2024
b3bf215
adding more debug info
MelReyCG Jul 23, 2024
80bd90a
more and more debug infos
MelReyCG Jul 24, 2024
5dee431
debug info uncrustify
MelReyCG Jul 24, 2024
89ab11b
silly fix test
MelReyCG Jul 24, 2024
6d43243
freeOnDevice fix test
MelReyCG Jul 25, 2024
309611e
Merge remote-tracking branch 'origin/develop' into feature/rey/transm…
MelReyCG Jul 25, 2024
4e16a41
DataTypes.hpp now only manage static types
MelReyCG Jul 26, 2024
99c20c8
generated files
MelReyCG Jul 26, 2024
d0c8bbb
Merge remote-tracking branch 'origin/develop' into fileIO-refactor-ba…
MelReyCG Jul 26, 2024
73093e9
🐛 physicsSolvers refactor compilation fix
MelReyCG Jul 26, 2024
008f8e8
sharper todos
MelReyCG Jul 26, 2024
23c47d6
♻️🔇 removing debug outputs + prefering move(host) instead of freeOnDe…
MelReyCG Jul 26, 2024
56a4db2
more todo
MelReyCG Jul 26, 2024
fb447b8
removing common -> fileIO
MelReyCG Jul 26, 2024
78afee2
last common->fileIO ref
MelReyCG Jul 26, 2024
675f6a6
removing common->codingUtilities
MelReyCG Jul 26, 2024
ef68fd0
logger has now a dedicated folder for upcoming files (future PRs)
MelReyCG Jul 26, 2024
71d9dbc
🐛 compil fix (dynamicCast)
MelReyCG Jul 29, 2024
e660950
📝 missed docs (where not previously catched by the CI)
MelReyCG Jul 29, 2024
df1be47
🐛 compil fix fix (dynamicCast)
MelReyCG Jul 29, 2024
9bb911a
📝 docs fix
MelReyCG Jul 29, 2024
4388b5d
Merge branch 'develop' into feature/rey/remove-circular-fileIO&common…
MelReyCG Jul 29, 2024
9580842
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 29, 2024
27090a2
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Jul 31, 2024
6981b3b
Merge remote-tracking branch 'origin/develop' into feature/rey/remove…
MelReyCG Jul 31, 2024
4084a46
Merge remote-tracking branch 'origin/develop' into feature/rey/remove…
MelReyCG Aug 2, 2024
6958c06
Merge branch 'develop' into feature/rey/transmissibilityOutput
MelReyCG Aug 2, 2024
73f7b56
Merge remote-tracking branch 'origin/feature/rey/remove-circular-file…
MelReyCG Aug 2, 2024
57c5d97
Merge branch 'feature/rey/transmissibilityOutput' of https://github.c…
MelReyCG Aug 2, 2024
9c93b4d
Merge branch 'develop' into feature/rey/transmissibilityOutput
rrsettgast Aug 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0" ?>

<Problem>
<!-- this exemple adds a transmissibility output to "deadoilStaircase.xml".

The "cellToCellDataCollection" gather the transmissibility data at the first timestep (triggered by
the SoloEvents). The transmissibility could be gathered at multiple timestep to see the influence
of the permeability variations.
All fields need to be individualy packed by the PackCollection, the TimeHistory outputs them in an hdf5.
-->

<Included>
<File name="./deadoil_3ph_staircase_3d.xml"/>
</Included>

<Events>

<SoloEvent
name="cellToCellDataCollectionEvent"
beginTime="1e5"
target="/Tasks/cellToCellDataCollection" />
<SoloEvent
name="cellAGlobalIdPackCollectionEvent"
beginTime="1e5"
target="/Tasks/cellAGlobalIdPackCollection" />
<SoloEvent
name="cellBGlobalIdPackCollectionEvent"
beginTime="1e5"
target="/Tasks/cellBGlobalIdPackCollection" />
<SoloEvent
name="transmissibilityABPackCollectionEvent"
beginTime="1e5"
target="/Tasks/transmissibilityABPackCollection" />
<SoloEvent
name="transmissibilityBAPackCollectionEvent"
beginTime="1e5"
target="/Tasks/transmissibilityBAPackCollection" />
<SoloEvent
name="cellToCellDataHistoryEvent"
beginTime="1e5"
target="/Outputs/cellToCellDataHistory" />

</Events>

<Tasks>
<CellToCellDataCollection
name="cellToCellDataCollection"
flowSolverName="compflow"
meshBody="mesh"
logLevel="1" />
<PackCollection
name="cellAGlobalIdPackCollection"
objectPath="/Tasks/cellToCellDataCollection"
fieldName="cellAGlobalId" />
<PackCollection
name="cellBGlobalIdPackCollection"
objectPath="/Tasks/cellToCellDataCollection"
fieldName="cellBGlobalId" />
<PackCollection
name="transmissibilityABPackCollection"
objectPath="/Tasks/cellToCellDataCollection"
fieldName="transmissibilityAB" />
<PackCollection
name="transmissibilityBAPackCollection"
objectPath="/Tasks/cellToCellDataCollection"
fieldName="transmissibilityBA" />
</Tasks>

<Outputs>
<TimeHistory
name="cellToCellDataHistory"
sources="{
/Tasks/cellAGlobalIdPackCollection,
/Tasks/cellBGlobalIdPackCollection,
/Tasks/transmissibilityABPackCollection,
/Tasks/transmissibilityBAPackCollection
}"
filename="deadoil_3ph_staircase_3d_cellToCellData" />
</Outputs>

</Problem>
17 changes: 17 additions & 0 deletions src/coreComponents/common/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,23 @@
SimulationError( std::exception const & subException, std::string const & msgToInsert );
};

/**
* @brief Exception class used to report errors from type conversion
* @todo (ErrorManager EPIC #2940) Consider adding a way to precise custom exception parameters, to add
* expected & encountered typeid for this one (in order to manage the exception output more precisely).
* We could also manage this by having: BadTypeErrorABC <|--- BadTypeError< T > /!\ compilation time
*/
struct BadTypeError : public std::runtime_error
{
/**
* @brief Constructor
* @param what the error message
*/
BadTypeError( std::string const & what ):
std::runtime_error( what )
{}

Check warning on line 534 in src/coreComponents/common/Logger.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Logger.hpp#L532-L534

Added lines #L532 - L534 were not covered by tests
};

/**
* @brief Exception class used for special control flow.
*/
Expand Down
96 changes: 51 additions & 45 deletions src/coreComponents/common/Units.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@

/// Mole rate in mol/s
MoleRate,

/// Transmissibility in m2/s
Transmissibility,
};


Expand All @@ -106,21 +109,22 @@
{
switch( unit )
{
default: return "unknown [?]";
case Dimensionless: return "dimensionless [1]";
case Pressure: return "pressure [Pa]";
case Temperature: return "temperature [K]";
case TemperatureInC: return "temperature [C]";
case Distance: return "distance [m]";
case Time: return "time [s]";
case Viscosity: return "viscosity [Pa*s]";
case Enthalpy: return "enthalpy [J/kg]";
case Density: return "density [kg/m3]";
case Solubility: return "solubility [g/L]";
case Mass: return "mass [kg]";
case Mole: return "mole [mol]";
case MassRate: return "mass rate [kg/s]";
case MoleRate: return "mole rate [mol/s]";
default: return "unknown [?]";
case Dimensionless: return "dimensionless [1]";

Check warning on line 113 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L112-L113

Added lines #L112 - L113 were not covered by tests
case Pressure: return "pressure [Pa]";
case Temperature: return "temperature [K]";

Check warning on line 115 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L115

Added line #L115 was not covered by tests
case TemperatureInC: return "temperature [C]";
case Distance: return "distance [m]";
case Time: return "time [s]";

Check warning on line 118 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L117-L118

Added lines #L117 - L118 were not covered by tests
case Viscosity: return "viscosity [Pa*s]";
case Enthalpy: return "enthalpy [J/kg]";
case Density: return "density [kg/m3]";
case Solubility: return "solubility [g/L]";
case Mass: return "mass [kg]";
case Mole: return "mole [mol]";
case MassRate: return "mass rate [kg/s]";
case MoleRate: return "mole rate [mol/s]";
case Transmissibility: return "transmissibility [(Pa*s*rm3/s)/Pa]";

Check warning on line 127 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L122-L127

Added lines #L122 - L127 were not covered by tests
}
}

Expand All @@ -132,21 +136,22 @@
{
switch( unit )
{
default: return "?";
case Dimensionless: return "1";
case Pressure: return "Pa";
case Temperature: return "K";
case TemperatureInC: return "C";
case Distance: return "m";
case Time: return "s";
case Viscosity: return "Pa*s";
case Enthalpy: return "J/kg";
case Density: return "kg/m3";
case Solubility: return "g/L";
case Mass: return "kg";
case Mole: return "mol";
case MassRate: return "kg/s";
case MoleRate: return "mol/s";
default: return "?";
case Dimensionless: return "1";
case Pressure: return "Pa";
case Temperature: return "K";
case TemperatureInC: return "C";
case Distance: return "m";
case Time: return "s";
case Viscosity: return "Pa*s";
case Enthalpy: return "J/kg";
case Density: return "kg/m3";
case Solubility: return "g/L";

Check warning on line 149 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L139-L149

Added lines #L139 - L149 were not covered by tests
case Mass: return "kg";
case Mole: return "mol";
case MassRate: return "kg/s";
case MoleRate: return "mol/s";
case Transmissibility: return "(Pa*s*rm3/s)/Pa";

Check warning on line 154 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L152-L154

Added lines #L152 - L154 were not covered by tests
}
}

Expand All @@ -161,21 +166,22 @@
{
switch( unit )
{
default: return GEOS_FMT( "value of {} [?]", value );
case Dimensionless: return GEOS_FMT( "value of {} [1]", value );
case Pressure: return GEOS_FMT( "pressure of {} [Pa]", value );
case Temperature: return GEOS_FMT( "temperature of {} [K]", value );
case TemperatureInC: return GEOS_FMT( "temperature of {} [K]", convertCToK( value ) );
case Distance: return GEOS_FMT( "distance of {} [s]", value );
case Time: return GEOS_FMT( "time of {} [s]", value );
case Viscosity: return GEOS_FMT( "viscosity of {} [Pa*s]", value );
case Enthalpy: return GEOS_FMT( "enthalpy of {} [J/kg]", value );
case Density: return GEOS_FMT( "density of {} [kg/m3]", value );
case Solubility: return GEOS_FMT( "solubility of {} [g/L]", value );
case Mass: return GEOS_FMT( "mass of {} [kg]", value );
case Mole: return GEOS_FMT( "mole of {} [mol]", value );
case MassRate: return GEOS_FMT( "mass rate of {} [kg/s]", value );
case MoleRate: return GEOS_FMT( "mole rate of {} [mol/s]", value );
default: return GEOS_FMT( "value of {} [?]", value );
case Dimensionless: return GEOS_FMT( "value of {} [1]", value );
case Pressure: return GEOS_FMT( "pressure of {} [Pa]", value );
case Temperature: return GEOS_FMT( "temperature of {} [K]", value );
case TemperatureInC: return GEOS_FMT( "temperature of {} [K]", convertCToK( value ) );
case Distance: return GEOS_FMT( "distance of {} [s]", value );
case Time: return GEOS_FMT( "time of {} [s]", value );
case Viscosity: return GEOS_FMT( "viscosity of {} [Pa*s]", value );
case Enthalpy: return GEOS_FMT( "enthalpy of {} [J/kg]", value );
case Density: return GEOS_FMT( "density of {} [kg/m3]", value );
case Solubility: return GEOS_FMT( "solubility of {} [g/L]", value );
case Mass: return GEOS_FMT( "mass of {} [kg]", value );
case Mole: return GEOS_FMT( "mole of {} [mol]", value );
case MassRate: return GEOS_FMT( "mass rate of {} [kg/s]", value );
case MoleRate: return GEOS_FMT( "mole rate of {} [mol/s]", value );
case Transmissibility: return GEOS_FMT( "transmissibility of {} [(Pa*s*rm3/s)/Pa]", value );

Check warning on line 184 in src/coreComponents/common/Units.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/common/Units.hpp#L169-L184

Added lines #L169 - L184 were not covered by tests
}
}

Expand Down
16 changes: 12 additions & 4 deletions src/coreComponents/dataRepository/Group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,12 @@ class Group
"Group " << getDataContext() << " has no child named " << key << std::endl
<< dumpSubGroupsNames(),
std::domain_error );

return dynamicCast< T & >( *child );
T * const castedChild = dynamicCast< T * >( child );
GEOS_THROW_IF( castedChild == nullptr,
GEOS_FMT( "{} was expected to be a '{}'.",
child->getDataContext(), LvArray::system::demangleType< T >() ),
BadTypeError );
return *castedChild;
}

/**
Expand All @@ -353,8 +357,12 @@ class Group
"Group " << getDataContext() << " has no child named " << key << std::endl
<< dumpSubGroupsNames(),
std::domain_error );

return dynamicCast< T const & >( *child );
T const * const castedChild = dynamicCast< T const * >( child );
GEOS_THROW_IF( castedChild == nullptr,
GEOS_FMT( "{} was expected to be a '{}'.",
child->getDataContext(), LvArray::system::demangleType< T >() ),
BadTypeError );
return *castedChild;
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/coreComponents/fileIO/timeHistory/PackCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void PackCollection::initializePostSubGroups( )
{
// coord meta collectors should have m_disableCoordCollection == true to avoid
// infinite recursive init calls here
// (side note: should we create a m_isMetaCollector field to prevent any confusion?)
metaCollector->initializePostSubGroups();
}
m_initialized = true;
Expand Down Expand Up @@ -255,7 +256,7 @@ localIndex PackCollection::numMetaDataCollectors() const

void PackCollection::buildMetaDataCollectors()
{
if( !m_disableCoordCollection )
if( !m_disableCoordCollection && m_targetIsMeshObject )
{
char const * coordField = nullptr;
if( m_objectPath.find( "nodeManager" ) != string::npos )
Expand Down
Loading
Loading