Commit 3df8c6e3 authored by John Tourtellott's avatar John Tourtellott

WIP update functions and other refinements

parent 74a19595
......@@ -292,9 +292,9 @@ format_table = {
],
'PHASE': [
card('density', item_path='material-type/density', as_property=True),
card('specific heat', item_path='material-type/thermal/specific-heat',
card('specific heat', item_path='material-type/specific-heat',
if_condition='fluid', as_property=True),
card('specific heat', item_path='material-type/thermal/specific-heat',
card('specific heat', item_path='material-type/specific-heat',
if_condition='solid', as_property=True),
card('specific heat',
item_path='material-type/thermal-two-phase/specific-heat',
......
......@@ -73,17 +73,16 @@
<Def>ht/interface</Def>
</Rule>
<!-- HT Diriclet BCs are exclusive to other exterior BCs -->
<!-- HT Dirichlet BCs are exclusive to other exterior BCs -->
<!-- HT Flux BCs are exclusinve to HTC and Radiation BCs-->
<Rule>
<Def>ht/boundary/dirichlet</Def>
<Def>ht/boundary/flux</Def>
</Rule>
<Rule>
<Def>ht/boundary/dirichlet</Def>
<Def>ht/boundary/HTC</Def>
</Rule>
<Rule>
<Def>ht/boundary/dirichlet</Def>
<Def>ht/boundary/flux</Def>
<Def>ht/boundary/radiation</Def>
</Rule>
</Exclusions>
......
......@@ -7,9 +7,9 @@
<Definitions>
<AttDef Type="fn" BaseType="" Abstract="true" Version="0"></AttDef>
<!-- Specific Heat-->
<AttDef Type="fn/specific-heat" Label="Specific Heat" BaseType="fn" RootName="SpecificHeatFn" Version="0">
<AttDef Type="fn/specific-heat" BaseType="fn" Label="Specific Heat" RootName="SpecificHeatFn" Version="0">
<ItemDefinitions>
<String Name="type" Label="Function Type" Version="0">
<String Name="type" Label="Function Type" Version="0" stuff="Heat Transfer">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
......@@ -32,7 +32,7 @@
<Value>linear</Value>
</DiscreteInfo>
</String>
<Group Name="tabular-values" Label="Tabular Data" Extensible="true" NumberOfRequiredGroups="1">
<Group Name="tabular-data" Label="Tabular Data" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="X" Label="Temp" NumberOfRequiredValues="1">
<Categories>
......@@ -52,7 +52,7 @@
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Group Name="polynomial-terms" Label="Polynomial Terms f(Temp)" Extensible="true" NumberOfRequiredGroups="1">
<Group Name="polynomial-terms" Label="Polynomial Terms" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="Coefficient" NumberOfRequiredValues="1">
<Categories>
......@@ -80,7 +80,7 @@
<Items>
<Item>interpolation</Item>
<Item>extrapolation</Item>
<Item>tabular-values</Item>
<Item>tabular-data</Item>
</Items>
</Structure>
</DiscreteInfo>
......@@ -88,146 +88,184 @@
</ItemDefinitions>
</AttDef>
<!-- Thermal Conductivity-->
<AttDef Type="fn/conductivity" BaseType="fn" Abstract="true" Version="0"></AttDef>
<AttDef Type="fn/conductivity/tabular" Label="Conductivity - Tabular" BaseType="fn/conductivity" RootName="ConductivityFn" Version="0">
<AttDef Type="fn/conductivity" BaseType="fn" Label="Conductivity" RootName="ConductivityFn" Version="0">
<ItemDefinitions>
<String Name="Interpolation" Label="Interpolation Method" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DiscreteInfo DefaultIndex="0">
<Value>linear</Value>
<Value>akima</Value>
</DiscreteInfo>
</String>
<String Name="Extrapolation" Label="Extrapolation Method" Version="0">
<String Name="type" Label="Function Type" Version="0" stuff="Heat Transfer">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DiscreteInfo DefaultIndex="0">
<Value>nearest</Value>
<Value>linear</Value>
</DiscreteInfo>
</String>
<Group Name="ValuePairs" Label="Tabular Data" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="X" Label="Temp" NumberOfRequiredValues="1">
<ChildrenDefinitions>
<String Name="interpolation" Label="Interpolation Method" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
<Double Name="Value" Label="Conductivity" NumberOfRequiredValues="1">
<DiscreteInfo DefaultIndex="0">
<Value>linear</Value>
<Value>akima</Value>
</DiscreteInfo>
</String>
<String Name="extrapolation" Label="Extrapolation Method" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
</ItemDefinitions>
</Group>
</ItemDefinitions>
</AttDef>
<AttDef Type="fn/conductivity/poly" Label="Conductivity - Polynomial" BaseType="fn/conductivity" RootName="ConductivityFn" Version="0">
<ItemDefinitions>
<Double Name="Center" Label="Center Temperature">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Group Name="ValuePairs" Label="Polynomial Terms f(Temp)" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="Coefficient" NumberOfRequiredValues="1">
<DiscreteInfo DefaultIndex="0">
<Value>nearest</Value>
<Value>linear</Value>
</DiscreteInfo>
</String>
<Group Name="tabular-data" Label="Tabular Data" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="X" Label="Temp" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
<Double Name="Value" Label="Conductivity" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
</ItemDefinitions>
</Group>
<Double Name="center" Label="Center Temperature">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Int Name="Exponent" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Int>
</ItemDefinitions>
</Group>
<Group Name="polynomial-terms" Label="Polynomial Terms" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="Coefficient" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
<Int Name="Exponent (Temp)" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Int>
</ItemDefinitions>
</Group>
</ChildrenDefinitions>
<DiscreteInfo>
<Structure>
<Value Enum="Polynomial"></Value>
<Items>
<Item>center</Item>
<Item>polynomial-terms</Item>
</Items>
</Structure>
<Structure>
<Value Enum="Tabular"></Value>
<Items>
<Item>interpolation</Item>
<Item>extrapolation</Item>
<Item>tabular-data</Item>
</Items>
</Structure>
</DiscreteInfo>
</String>
</ItemDefinitions>
</AttDef>
<!-- Initial Temperature-->
<AttDef Type="fn/temperature" BaseType="fn" Abstract="true" Version="0"></AttDef>
<AttDef Type="fn/temperature/tabular" Label="Initial Temperature - Tabular" BaseType="fn/temperature" RootName="TemperatureFn" Version="0">
<AttDef Type="fn/temperature" BaseType="fn" Label="Initial Temperature" RootName="TemperatureFn" Version="0">
<ItemDefinitions>
<String Name="Interpolation" Label="Interpolation Method" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DiscreteInfo DefaultIndex="0">
<Value>linear</Value>
<Value>akima</Value>
</DiscreteInfo>
</String>
<String Name="Extrapolation" Label="Extrapolation Method" Version="0">
<String Name="type" Label="Function Type" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DiscreteInfo DefaultIndex="0">
<Value>nearest</Value>
<Value>linear</Value>
</DiscreteInfo>
</String>
<Group Name="Data" Label="Tabular Data" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="X" Label="X:" NumberOfRequiredValues="1">
<ChildrenDefinitions>
<String Name="interpolation" Label="Interpolation Method" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Double Name="Y" Label="Y:" NumberOfRequiredValues="1">
<DiscreteInfo DefaultIndex="0">
<Value>linear</Value>
<Value>akima</Value>
</DiscreteInfo>
</String>
<String Name="extrapolation" Label="Extrapolation Method" Version="0">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Double Name="Z" Label="Z:" NumberOfRequiredValues="1">
<DiscreteInfo DefaultIndex="0">
<Value>nearest</Value>
<Value>linear</Value>
</DiscreteInfo>
</String>
<Group Name="tabular-data" Label="Tabular Data" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="X" Label="X:" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Double Name="Y" Label="Y:" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Double Name="Z" Label="Z:" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Double Name="Value" Label="Temperature" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
</ItemDefinitions>
</Group>
<Double Name="center" Label="Center Coordinates" NumberOfRequiredValues="3">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Double Name="Value" Label="Temperature" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
</ItemDefinitions>
</Group>
</ItemDefinitions>
</AttDef>
<AttDef Type="fn/temperature/poly" Label="Initial Temperature - Polynomial" BaseType="fn/temperature" RootName="TemperatureFn" Version="0">
<ItemDefinitions>
<Double Name="Center" Label="Center Temperature">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
</Double>
<Group Name="Data" Label="Polynomial Terms f(x,y,z)" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="Coefficient" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
<Int Name="Exponent" Label="Exponents (x,y,z)" NumberOfRequiredValues="3">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<ComponentLabels>
<Label>X</Label>
<Label>Y</Label>
<Label>Z</Label>
</ComponentLabels>
<DefaultValue>0</DefaultValue>
</Int>
</ItemDefinitions>
</Group>
<Group Name="polynomial-terms" Label="Polynomial Terms f(x,y,z)" Extensible="true" NumberOfRequiredGroups="1">
<ItemDefinitions>
<Double Name="Coefficient" NumberOfRequiredValues="1">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
</Double>
<Int Name="Exponent" Label="Exponents (x,y,z)" NumberOfRequiredValues="3">
<Categories>
<Cat>Heat Transfer</Cat>
</Categories>
<ComponentLabels>
<Label>X</Label>
<Label>Y</Label>
<Label>Z</Label>
</ComponentLabels>
<DefaultValue>0</DefaultValue>
</Int>
</ItemDefinitions>
</Group>
</ChildrenDefinitions>
<DiscreteInfo>
<Structure>
<Value Enum="Polynomial"></Value>
<Items>
<Item>center</Item>
<Item>polynomial-terms</Item>
</Items>
</Structure>
<Structure>
<Value Enum="Tabular"></Value>
<Items>
<Item>interpolation</Item>
<Item>extrapolation</Item>
<Item>tabular-data</Item>
</Items>
</Structure>
</DiscreteInfo>
</String>
</ItemDefinitions>
</AttDef>
</Definitions>
......
......@@ -39,9 +39,8 @@
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
<Min Inclusive="false">0.0</Min>
</RangeInfo>
</Double>
<Double Name="density-deviation" Label="Density Deviation" Optional="true" IsEnabledByDefault="false">
......@@ -62,10 +61,9 @@ density from the reference density</BriefDescription>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<ExpressionType>fn/conductivity</ExpressionType>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
<Min Inclusive="false">0.0</Min>
</RangeInfo>
</Double>
<Double Name="viscosity" Label="Viscosity (nu)">
......@@ -78,119 +76,33 @@ density from the reference density</BriefDescription>
<DefaultValue>0.0</DefaultValue>
<ExpressionType>tabular-function</ExpressionType>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
<Min Inclusive="false">0.0</Min>
</RangeInfo>
</Double>
<String Name="thermal" Label="Thermal Specification">
<Double Name="specific-heat" Label="Specific Heat (Cp)">
<BriefDescription>Specific heat of the material phase</BriefDescription>
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<ChildrenDefinitions>
<Double Name="specific-heat" Label="Specific Heat (Cp)">
<BriefDescription>Specific heat of the material phase</BriefDescription>
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<ExpressionType>fn/specific-heat</ExpressionType>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
</RangeInfo>
</Double>
<Double Name="enthalpy" Label="Enthalpy (E)">
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<ExpressionType>tabular-function</ExpressionType>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
</RangeInfo>
</Double>
</ChildrenDefinitions>
<DiscreteInfo DefaultIndex="0">
<Structure>
<Value Enum="Specific Heat">specific-heat</Value>
<Items>
<Item>specific-heat</Item>
</Items>
</Structure>
<Structure>
<Value Enum="Enthalpy">enthalpy</Value>
<Items>
<Item>enthalpy</Item>
</Items>
</Structure>
</DiscreteInfo>
</String>
<String Name="thermal-two-phase" Label="Thermal Specification">
<ExpressionType>fn/specific-heat</ExpressionType>
<RangeInfo>
<Min Inclusive="false">0.0</Min>
</RangeInfo>
</Double>
<!-- Two phase properties-->
<Double Name="latent-heat" Label="Latent Heat (Lf)">
<BriefDescription>The latent heats of the phase transformations.</BriefDescription>
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<ChildrenDefinitions>
<Double Name="specific-heat" Label="Specific Heat (Cp)">
<BriefDescription>Specific heat of the material phase</BriefDescription>
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<ExpressionType>fn/specific-heat</ExpressionType>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
</RangeInfo>
</Double>
<Double Name="latent-heat" Label="Latent Heat (Lf)">
<BriefDescription>The latent heats of the phase transformations.</BriefDescription>
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
</RangeInfo>
</Double>
<Double Name="enthalpy" Label="Enthalpy (E)">
<Categories>
<Cat>Fluid Flow</Cat>
<Cat>Heat Transfer</Cat>
<Cat>Solid Mechanics</Cat>
</Categories>
<DefaultValue>0.0</DefaultValue>
<ExpressionType>tabular-function</ExpressionType>
<RangeInfo>
<Min Inclusive="true">0.0</Min>
</RangeInfo>
</Double>
</ChildrenDefinitions>
<DiscreteInfo DefaultIndex="0">
<Structure>
<Value Enum="Specific Heat">specific-heat</Value>
<Items>
<Item>specific-heat</Item>
<Item>latent-heat</Item>
</Items>
</Structure>
<Structure>
<Value Enum="Enthalpy">enthalpy</Value>
<Items>
<Item>enthalpy</Item>
</Items>
</Structure>
</DiscreteInfo>
</String>
<!-- Two phase properties-->
<RangeInfo>
<Min Inclusive="false">0.0</Min>
</RangeInfo>
</Double>
<Double Name="solid-transition-temperature" Label="Solidus Temperature (Ts)">
<Categories>
<Cat>Fluid Flow</Cat>
......@@ -239,7 +151,7 @@ used to permit collapse of small void bubbles.</BriefDescription>
<Item>density</Item>
<Item>density-deviation</Item>
<Item>conductivity</Item>
<Item>thermal</Item>
<Item>specific-heat</Item>
</Items>
</Structure>
<Structure>
......@@ -249,7 +161,7 @@ used to permit collapse of small void bubbles.</BriefDescription>
<Item>density-deviation</Item>
<Item>conductivity</Item>
<Item>viscosity</Item>
<Item>thermal</Item>
<Item>specific-heat</Item>
</Items>
</Structure>
<Structure>
......@@ -259,7 +171,8 @@ used to permit collapse of small void bubbles.</BriefDescription>
<Item>density-deviation</Item>
<Item>conductivity</Item>
<Item>viscosity</Item>
<Item>thermal-two-phase</Item>
<Item>specific-heat</Item>
<Item>latent-heat</Item>
<Item>solid-transition-temperature</Item>
<Item>liquid-transition-temperature</Item>
</Items>
......
......@@ -65,7 +65,7 @@
<Min Inclusive="true">0.0</Min>
</RangeInfo>
</Double>
<Group Name="output-times" Label="Additional Output Control" AdvanceLevel="1" Extensible="true" NumberOfRequiredGroups="0">
<Group Name="output-times" Label="Additional Output Control" Extensible="true" NumberOfRequiredGroups="0">
<ItemDefinitions>
<Double Name="time" Label="Output Times" NumberOfRequiredValues="2">
<Categories>
......
doctype xml
mixin tabCommon(category)
//- Interpolation items common to all tabular functions
String(Name="interpolation" Label="Interpolation Method" Version="0")
Categories #[Cat= category]
DiscreteInfo(DefaultIndex="0")
Value linear
Value akima
String(Name="extrapolation" Label="Extrapolation Method" Version="0")
Categories #[Cat= category]
DiscreteInfo(DefaultIndex="0")
Value nearest
Value linear
mixin fnDiscreteInfo
//- DiscreteInfo section common to all functions
DiscreteInfo
Structure
Value(Enum="Polynomial")
Items
Item center
Item polynomial-terms
Structure
Value(Enum="Tabular")
Items
Item interpolation
Item extrapolation
Item tabular-data
mixin fn1(category, tabLabels, polyLabels)
//- Mixin to generate function with 1 independent variable
//- tabLabels in list of length 3
//- polyLabels is list of length 4
ItemDefinitions
String(Name="type" Label="Function Type" Version="0" stuff=category)
Categories #[Cat= category]
ChildrenDefinitions
//- Tabular items
+tabCommon(category)
Group(Name="tabular-data" Label=tabLabels[0] Extensible="true" NumberOfRequiredGroups="1")
ItemDefinitions
Double(Name="X" Label=tabLabels[1] NumberOfRequiredValues="1")
Categories #[Cat= category]
Double(Name="Value" Label=tabLabels[2] NumberOfRequiredValues="1")
Categories #[Cat= category]
//- Polynomical items
Double(Name="center" Label=polyLabels[0])
Categories #[Cat= category]
DefaultValue 0
Group(Name="polynomial-terms" Label=polyLabels[1] Extensible="true" NumberOfRequiredGroups="1")