Skip to content

Commit fac1771

Browse files
committed
Add the ability to ignore a fluid property from the tabulation file by sepecifying the
interpolated properties in the input - address porous flow failure that was relying on forwarding a property
1 parent 5d229de commit fac1771

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

modules/fluid_properties/src/fluidproperties/TabulatedFluidProperties.C

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ TabulatedFluidProperties::validParams()
7070
"density enthalpy internal_energy viscosity");
7171
params.addParam<MultiMooseEnum>("interpolated_properties",
7272
properties,
73-
"Properties to interpolate if no data file is provided");
73+
"Properties to interpolate. If unspecified and a data file is "
74+
"provided, the properties from the data file will be used. If "
75+
"specified, some properties from the data file can be ignored.");
7476

7577
// (p,T) grid parameters
7678
params.addRangeCheckedParam<Real>(
@@ -2390,9 +2392,12 @@ TabulatedFluidProperties::readFileTabulationData(const bool use_pT)
23902392
"understands. It will be ignored.");
23912393
// We could be reading a (v,e) tabulation after having read a (p,T) tabulation, do not
23922394
// insert twice
2395+
// Also only allow properties specified as interpolated if user passed the parameter
23932396
else if (std::find(_interpolated_properties.begin(),
23942397
_interpolated_properties.end(),
2395-
column_names[i]) == _interpolated_properties.end())
2398+
column_names[i]) == _interpolated_properties.end() &&
2399+
(!isParamSetByUser("interpolated_properties") ||
2400+
_interpolated_properties_enum.contains(column_names[i])))
23962401
_interpolated_properties.push_back(column_names[i]);
23972402
}
23982403
}

modules/fluid_properties/test/tests/tabulated/tabulated_v_e.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
[]
104104
[tabulated]
105105
type = TabulatedBicubicFluidProperties
106-
interpolated_properties = 'density enthalpy viscosity internal_energy k c cv cp entropy'
106+
interpolated_properties = 'density enthalpy viscosity internal_energy k c cv cp entropy pressure temperature'
107107

108108
# Uncomment this to read the tabulation
109109
# fluid_property_file = fluid_properties.csv

modules/porous_flow/test/tests/fluidstate/water_vapor_tab.i

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@
166166
[]
167167

168168
[FluidProperties]
169-
170169
[water_true]
171170
type = Water97FluidProperties
172171
[]
@@ -175,6 +174,8 @@
175174
fp = water_true
176175
allow_fp_and_tabulation = true
177176
fluid_property_file = fluid_properties_extended.csv
177+
# the test relies on forwarding enthalpy evaluations to 'water_true'
178+
interpolated_properties = 'density viscosity'
178179
[]
179180
[]
180181

0 commit comments

Comments
 (0)