Skip to content

Commit

Permalink
Merge pull request #27027 from GiudGiud/PR_fp_submodules
Browse files Browse the repository at this point in the history
Add external fluid property submodules
  • Loading branch information
GiudGiud authored Sep 7, 2024
2 parents a96d9f0 + c143d69 commit 04c90e6
Show file tree
Hide file tree
Showing 32 changed files with 615 additions and 38 deletions.
24 changes: 24 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,27 @@
path = modules/solid_mechanics/contrib/neml2
url = https://github.com/reverendbedford/neml2.git
update = none
[submodule "modules/fluid_properties/contrib/sodium"]
path = modules/fluid_properties/contrib/sodium
url = https://github.com/idaholab/sodium.git
update = none
[submodule "modules/fluid_properties/contrib/potassium"]
path = modules/fluid_properties/contrib/potassium
url = https://github.com/idaholab/potassium.git
update = none
[submodule "modules/fluid_properties/contrib/nitrogen"]
path = modules/fluid_properties/contrib/nitrogen
url = https://github.com/idaholab/nitrogen.git
update = none
[submodule "modules/fluid_properties/contrib/helium"]
path = modules/fluid_properties/contrib/helium
url = https://github.com/idaholab/helium.git
update = none
[submodule "modules/fluid_properties/contrib/air"]
path = modules/fluid_properties/contrib/air
url = https://github.com/idaholab/air.git
update = none
[submodule "modules/fluid_properties/contrib/carbon_dioxide"]
path = modules/fluid_properties/contrib/carbon_dioxide
url = https://github.com/idaholab/carbon_dioxide.git
update = none
109 changes: 79 additions & 30 deletions modules/doc/config.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,82 @@
Content:
- framework/doc/content
- python/doc/content
- modules/doc/content
- modules/chemical_reactions/doc/content
- modules/combined/doc/content
- modules/contact/doc/content
- modules/electromagnetics/doc/content
- modules/external_petsc_solver/doc/content
- modules/fluid_properties/doc/content
- modules/fsi/doc/content
- modules/functional_expansion_tools/doc/content
- modules/geochemistry/doc/content
- modules/heat_transfer/doc/content
- modules/level_set/doc/content
- modules/misc/doc/content
- modules/navier_stokes/doc/content
- modules/optimization/doc/content
- modules/peridynamics/doc/content
- modules/phase_field/doc/content
- modules/porous_flow/doc/content
- modules/ray_tracing/doc/content
- modules/rdg/doc/content
- modules/reactor/doc/content
- modules/richards/doc/content
- modules/scalar_transport/doc/content
- modules/solid_properties/doc/content
- modules/stochastic_tools/doc/content
- modules/solid_mechanics/doc/content
- modules/thermal_hydraulics/doc/content
- modules/xfem/doc/content
framework:
root_dir: ${MOOSE_DIR}/framework/doc/content
modules:
root_dir: ${MOOSE_DIR}/modules/doc/content
python:
root_dir: ${MOOSE_DIR}/python/doc/content
chemical_reactions:
root_dir: ${MOOSE_DIR}/modules/chemical_reactions/doc/content
combined:
root_dir: ${MOOSE_DIR}/modules/combined/doc/content
contact:
root_dir: ${MOOSE_DIR}/modules/contact/doc/content
electromagnetics:
root_dir: ${MOOSE_DIR}/modules/electromagnetics/doc/content
external_petsc_solver:
root_dir: ${MOOSE_DIR}/modules/external_petsc_solver/doc/content
fluid_properties:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/doc/content
fsi:
root_dir: ${MOOSE_DIR}/modules/fsi/doc/content
functional_expansion_tools:
root_dir: ${MOOSE_DIR}/modules/functional_expansion_tools/doc/content
geochemistry:
root_dir: ${MOOSE_DIR}/modules/geochemistry/doc/content
heat_transfer:
root_dir: ${MOOSE_DIR}/modules/heat_transfer/doc/content
level_set:
root_dir: ${MOOSE_DIR}/modules/level_set/doc/content
misc:
root_dir: ${MOOSE_DIR}/modules/misc/doc/content
navier_stokes:
root_dir: ${MOOSE_DIR}/modules/navier_stokes/doc/content
optimization:
root_dir: ${MOOSE_DIR}/modules/optimization/doc/content
peridynamics:
root_dir: ${MOOSE_DIR}/modules/peridynamics/doc/content
phase_field:
root_dir: ${MOOSE_DIR}/modules/phase_field/doc/content
porous_flow:
root_dir: ${MOOSE_DIR}/modules/porous_flow/doc/content
ray_tracing:
root_dir: ${MOOSE_DIR}/modules/ray_tracing/doc/content
rdg:
root_dir: ${MOOSE_DIR}/modules/rdg/doc/content
richards:
root_dir: ${MOOSE_DIR}/modules/richards/doc/content
reactor:
root_dir: ${MOOSE_DIR}/modules/reactor/doc/content
scalar_transport:
root_dir: ${MOOSE_DIR}/modules/scalar_transport/doc/content
solid_mechanics:
root_dir: ${MOOSE_DIR}/modules/solid_mechanics/doc/content
solid_properties:
root_dir: ${MOOSE_DIR}/modules/solid_properties/doc/content
stochastic_tools:
root_dir: ${MOOSE_DIR}/modules/stochastic_tools/doc/content
thermal_hydraulics:
root_dir: ${MOOSE_DIR}/modules/thermal_hydraulics/doc/content
xfem:
root_dir: ${MOOSE_DIR}/modules/xfem/doc/content
air:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/air/doc/content/source
external: True
carbon_dioxide:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/carbon_dioxide/doc/content/source
external: True
helium:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/helium/doc/content/source
external: True
nitrogen:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/nitrogen/doc/content/source
external: True
potassium:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/potassium/doc/content/source
external: True
sodium:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/sodium/doc/content/source
external: True
Renderer:
type: MooseDocs.base.MaterializeRenderer
favicon: media/moose.ico
Expand Down Expand Up @@ -81,6 +129,7 @@ Extensions:
Component: Components/*/*
remove:
framework: !include framework/doc/remove.yml
fluid_properties: !include modules/fluid_properties/doc/remove.yml
richards: !include modules/richards/doc/remove.yml
stochastic_tools: !include modules/stochastic_tools/doc/remove.yml
MooseDocs.extensions.common:
Expand Down
19 changes: 19 additions & 0 deletions modules/doc/moosedocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,25 @@
sys.exit(1)
os.environ['MOOSE_DIR'] = MOOSE_DIR

# Locate AIR submodule
if 'AIR_DIR' not in os.environ:
os.environ['AIR_DIR'] = os.path.abspath(os.path.join(MOOSE_DIR, 'modules/fluid_properties/contrib/air'))
# Locate CARBON_DIOXIDE submodule
if 'CARBON_DIOXIDE_DIR' not in os.environ:
os.environ['CARBON_DIOXIDE_DIR'] = os.path.abspath(os.path.join(MOOSE_DIR, 'modules/fluid_properties/contrib/carbon_dioxide'))
# Locate HELIUM submodule
if 'HELIUM_DIR' not in os.environ:
os.environ['HELIUM_DIR'] = os.path.abspath(os.path.join(MOOSE_DIR, 'modules/fluid_properties/contrib/helium'))
# Locate NITROGEN submodule
if 'NITROGEN_DIR' not in os.environ:
os.environ['NITROGEN_DIR'] = os.path.abspath(os.path.join(MOOSE_DIR, 'modules/fluid_properties/contrib/nitrogen'))
# Locate POTASSIUM submodule
if 'POTASSIUM_DIR' not in os.environ:
os.environ['POTASSIUM_DIR'] = os.path.abspath(os.path.join(MOOSE_DIR, 'modules/fluid_properties/contrib/potassium'))
# Locate SODIUM submodule
if 'SODIUM_DIR' not in os.environ:
os.environ['SODIUM_DIR'] = os.path.abspath(os.path.join(MOOSE_DIR, 'modules/fluid_properties/contrib/sodium'))

# Append MOOSE python directory
MOOSE_PYTHON_DIR = os.path.join(MOOSE_DIR, 'python')
if MOOSE_PYTHON_DIR not in sys.path:
Expand Down
1 change: 1 addition & 0 deletions modules/fluid_properties/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ MODULE_DIR ?= $(shell dirname `pwd`)
MOOSE_DIR ?= $(shell dirname $(MODULE_DIR))
FRAMEWORK_DIR ?= $(MOOSE_DIR)/framework
ADDITIONAL_CPPFLAGS += -Wall -Wextra

###############################################################################

# framework
Expand Down
1 change: 1 addition & 0 deletions modules/fluid_properties/contrib/air
Submodule air added at 407348
1 change: 1 addition & 0 deletions modules/fluid_properties/contrib/carbon_dioxide
Submodule carbon_dioxide added at 87bc53
1 change: 1 addition & 0 deletions modules/fluid_properties/contrib/helium
Submodule helium added at 9e24dd
1 change: 1 addition & 0 deletions modules/fluid_properties/contrib/nitrogen
Submodule nitrogen added at 0790bb
1 change: 1 addition & 0 deletions modules/fluid_properties/contrib/potassium
Submodule potassium added at c72539
1 change: 1 addition & 0 deletions modules/fluid_properties/contrib/sodium
Submodule sodium added at d183a9
30 changes: 28 additions & 2 deletions modules/fluid_properties/doc/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
Content:
- framework/doc/content
- modules/fluid_properties/doc/content
framework:
root_dir: framework/doc/content
fluid_properties:
root_dir: modules/fluid_properties/doc/content
air:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/air/doc/content/source
external: True
carbon_dioxide:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/carbon_dioxide/doc/content/source
external: True
helium:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/helium/doc/content/source
external: True
nitrogen:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/nitrogen/doc/content/source
external: True
potassium:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/potassium/doc/content/source
external: True
sodium:
root_dir: ${MOOSE_DIR}/modules/fluid_properties/contrib/sodium/doc/content/source
external: True

Renderer:
type: MooseDocs.base.MaterializeRenderer
Expand All @@ -20,6 +40,12 @@ Extensions:
includes:
- framework/include
- modules/fluid_properties/include
- ${MOOSE_DIR}/modules/fluid_properties/contrib/air/include
- ${MOOSE_DIR}/modules/fluid_properties/contrib/carbon_dioxide/include
- ${MOOSE_DIR}/modules/fluid_properties/contrib/helium/include
- ${MOOSE_DIR}/modules/fluid_properties/contrib/nitrogen/include
- ${MOOSE_DIR}/modules/fluid_properties/contrib/potassium/include
- ${MOOSE_DIR}/modules/fluid_properties/contrib/sodium/include
MooseDocs.extensions.common:
shortcuts: !include framework/doc/globals.yml
MooseDocs.extensions.acronym:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# External Fluid Properties Submodules

Additional submodules are available as `git submodules`. They can be downloaded by performing:

```
cd ~/project/moose
git submodule update --init --checkout modules/fluid_properties/contrib/air modules/fluid_properties/contrib/carbon_dioxide modules/fluid_properties/contrib/helium modules/fluid_properties/contrib/nitrogen modules/fluid_properties/contrib/potassium modules/fluid_properties/contrib/sodium
cd modules fluid_properties
make -j6
```

This will download and build the optional submodules.
The optional submodules contain fluid properties for:

- [Air](AirSBTLFluidProperties.md optional=True)
- Carbon dioxide [liquid](CarbonDioxideLiquidFluidProperties.md optional=True), [vapor](CarbonDioxideVaporFluidProperties.md optional=True) and [two-phase](CarbonDioxideTwoPhaseFluidProperties.md optional=True) fluid properties, as well with [the homogeneous equilibrium model](CarbonDioxideHEMFluidProperties.md optional=True)
- [Helium](HeliumSBTLFluidProperties.md optional=True)
- [Nitrogen](NitrogenSBTLFluidProperties.md optional=True)
- Potassium [liquid](PotassiumLiquidFluidProperties.md optional=True), [vapor](PotassiumVaporFluidProperties.md optional=True) and [two-phase](PotassiumTwoPhaseFluidProperties.md optional=True)
- Sodium [liquid](SodiumLiquidFluidProperties.md optional=True), [vapor](SodiumVaporFluidProperties.md optional=True) and [two-phase](SodiumTwoPhaseFluidProperties.md optional=True)
91 changes: 91 additions & 0 deletions modules/fluid_properties/fluid_properties.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,94 @@ ifneq ($(wildcard $(SALINE_SRC)/cpp/data_store.cc),)
ADDITIONAL_CPPFLAGS += -DSALINE_ENABLED
include $(APPLICATION_DIR)/contrib/saline.mk
endif
# Fluid properties submodules
AIR_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/air
AIR_FP_CONTENT := $(shell ls $(AIR_FP_DIR) 2> /dev/null)
CARBON_DIOXIDE_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/carbon_dioxide
CARBON_DIOXIDE_FP_CONTENT := $(shell ls $(CARBON_DIOXIDE_FP_DIR) 2> /dev/null)
HELIUM_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/helium
HELIUM_FP_CONTENT := $(shell ls $(HELIUM_FP_DIR) 2> /dev/null)
NITROGEN_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/nitrogen
NITROGEN_FP_CONTENT := $(shell ls $(NITROGEN_FP_DIR) 2> /dev/null)
POTASSIUM_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/potassium
POTASSIUM_FP_CONTENT := $(shell ls $(POTASSIUM_FP_DIR) 2> /dev/null)
SODIUM_FP_DIR ?= ${MOOSE_DIR}/modules/fluid_properties/contrib/sodium
SODIUM_FP_CONTENT := $(shell ls $(SODIUM_FP_DIR) 2> /dev/null)

# AIR
ifneq ($(AIR_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
AIR_DIR := $(AIR_FP_DIR)
APPLICATION_DIR := $(AIR_FP_DIR)
APPLICATION_NAME := air
libmesh_CXXFLAGS += -DAIR_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
include $(FRAMEWORK_DIR)/app.mk
include $(AIR_FP_DIR)/libSBTL_Air.mk
endif
endif

# CARBON_DIOXIDE
ifneq ($(CARBON_DIOXIDE_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
CARBON_DIOXIDE_DIR := $(CARBON_DIOXIDE_FP_DIR)
APPLICATION_DIR := $(CARBON_DIOXIDE_FP_DIR)
APPLICATION_NAME := carbon_dioxide
libmesh_CXXFLAGS += -DCARBON_DIOXIDE_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
include $(FRAMEWORK_DIR)/app.mk
include $(CARBON_DIOXIDE_FP_DIR)/libSBTL_CarbonDioxide.mk
endif
endif

# NITROGEN
ifneq ($(NITROGEN_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
NITROGEN_DIR := $(NITROGEN_FP_DIR)
APPLICATION_DIR := $(NITROGEN_FP_DIR)
APPLICATION_NAME := nitrogen
libmesh_CXXFLAGS += -DNITROGEN_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
include $(FRAMEWORK_DIR)/app.mk
include $(NITROGEN_FP_DIR)/libSBTL_Nitrogen.mk
endif
endif

# HELIUM
ifneq ($(HELIUM_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
HELIUM_DIR := $(HELIUM_FP_DIR)
APPLICATION_DIR := $(HELIUM_FP_DIR)
APPLICATION_NAME := helium
libmesh_CXXFLAGS += -DHELIUM_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
include $(FRAMEWORK_DIR)/app.mk
include $(HELIUM_FP_DIR)/libSBTL_Helium.mk
endif
endif

# POTASSIUM
ifneq ($(POTASSIUM_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
POTASSIUM_DIR := $(POTASSIUM_FP_DIR)
APPLICATION_DIR := $(POTASSIUM_FP_DIR)
APPLICATION_NAME := potassium
libmesh_CXXFLAGS += -DPOTASSIUM_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
include $(FRAMEWORK_DIR)/app.mk
include $(POTASSIUM_FP_DIR)/libPotassiumProperties.mk
endif
endif

# SODIUM
ifneq ($(SODIUM_FP_CONTENT),)
ifneq ($(BUILDING_FP_APP), yes)
SODIUM_DIR := $(SODIUM_FP_DIR)
APPLICATION_DIR := $(SODIUM_FP_DIR)
APPLICATION_NAME := sodium
libmesh_CXXFLAGS += -DSODIUM_FP_ENABLED -DSKIP_MODULE_LOAD
GEN_REVISION := yes
include $(FRAMEWORK_DIR)/app.mk
include $(SODIUM_FP_DIR)/libSodiumProperties.mk
endif
endif
Loading

0 comments on commit 04c90e6

Please sign in to comment.