Commit 7ea79df1 authored by John Tourtellott's avatar John Tourtellott

Partial fix for SLAC bug reports

Spreadsheet numbers 18, 31, 33, 34, 38, 39, 42
parent 876432cd
...@@ -142,20 +142,20 @@ ...@@ -142,20 +142,20 @@
<View Type="Group" Title="TEM3P Thermal Linear" TabPosition="North" TabIcons="false"> <View Type="Group" Title="TEM3P Thermal Linear" TabPosition="North" TabIcons="false">
<Views> <Views>
<View Title="TEM3P Thermal BC" /> <View Title="TEM3P Thermal BC" />
<View Title="TEM3P Thermal Material" />
<View Title="TEM3P Thermal Analysis"/>
<View Title="Thermal Shells" /> <View Title="Thermal Shells" />
<View Title="TEM3P Thermal Material" />
<View Title="Heat Sources" /> <View Title="Heat Sources" />
<View Title="TEM3P Thermal Analysis"/>
</Views> </Views>
</View> </View>
<View Type="Group" Title="TEM3P Thermal Nonlinear" TabPosition="North" TabIcons="false"> <View Type="Group" Title="TEM3P Thermal Nonlinear" TabPosition="North" TabIcons="false">
<Views> <Views>
<View Title="TEM3P Thermal BC" /> <View Title="TEM3P Thermal BC" />
<View Title="TEM3P Thermal Material" />
<View Title="TEM3P Thermal Analysis"/>
<View Title="Thermal Shells" /> <View Title="Thermal Shells" />
<View Title="TEM3P Thermal Material" />
<View Title="Heat Sources" /> <View Title="Heat Sources" />
<View Title="TEM3P Thermal Analysis"/>
</Views> </Views>
</View> </View>
......
...@@ -55,21 +55,18 @@ SMTK_AttributeSystem(Version="2") ...@@ -55,21 +55,18 @@ SMTK_AttributeSystem(Version="2")
AttDef(Type="TEM3PLFDetuning" Label="LF Detuning" BaseType="TEM3PMechanicalBC" Version="0") AttDef(Type="TEM3PLFDetuning" Label="LF Detuning" BaseType="TEM3PMechanicalBC" Version="0")
ItemDefinitions ItemDefinitions
Group(Name="Omega3PResults" Label="Omega3P Results" NumberOfRequiredGroups="1" Version="0") String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Results data from Omega3P simulation BriefDescription Full path existing directory on a NERSC file system. where the omega3p results are stored
ItemDefinitions Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0") Int(Name="WhichMode" Label="Mode Number" Version="0")
BriefDescription Full path existing directory on a NERSC file system. where the omega3p results are stored BriefDescription The mode number calculated from the omega3p results to be imported into tem3p
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic] Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
Int(Name="WhichMode" Label="Mode Number" Version="0") DefaultValue 0
BriefDescription The mode number calculated from the omega3p results to be imported into tem3p RangeInfo #[Min(Inclusive="true") 0]
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic] Int(Name="Omega3PId" Label="Omega3P Id" Version="0")
DefaultValue 0 BriefDescription Sideset id of the interface surface with Omega3P
RangeInfo #[Min(Inclusive="true") 0] Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
Int(Name="Omega3PId" Label="Omega3P Id" Version="0") RangeInfo #[Min(Inclusive="true") 0]
BriefDescription Sideset id of the interface surface with Omega3P
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
RangeInfo #[Min(Inclusive="true") 0]
String(Name="LFDetuningMethod" Label="Method" Version="0") String(Name="LFDetuningMethod" Label="Method" Version="0")
BriefDescription Method to be used for field normalization BriefDescription Method to be used for field normalization
...@@ -268,6 +265,7 @@ SMTK_AttributeSystem(Version="2") ...@@ -268,6 +265,7 @@ SMTK_AttributeSystem(Version="2")
DiscreteInfo(DefaultIndex=0) DiscreteInfo(DefaultIndex=0)
Value(Enum="1 = Full Cell") 1 Value(Enum="1 = Full Cell") 1
Value(Enum="0 = Half Cell") 0 Value(Enum="0 = Half Cell") 0
Value(Enum="3 = Quarter Cell") 2
String(Name="SurfaceResistance" Label="Surface Resistance") String(Name="SurfaceResistance" Label="Surface Resistance")
BriefDescription Nonlinear surface resistance BriefDescription Nonlinear surface resistance
......
...@@ -66,7 +66,11 @@ SMTK_AttributeSystem(Version="2") ...@@ -66,7 +66,11 @@ SMTK_AttributeSystem(Version="2")
= '\n' = '\n'
AttDef(Type="ExternalVolumeHeating" Label="External Volume Heating" BaseType="HeatSource" Version="0") AttDef(Type="ExternalVolumeHeating" Label="External Volume Heating" BaseType="HeatSource" Version="0")
ItemDefinitions ItemDefinitions
File(Name="DataFile" Label="Data File" ShouldExist="true" NumberOfRequiredValues="1" Version="0") //- Use hidden item to hard-code Condition type
String(Name="ConditionType" AdvanceLevel="99")
DefaultValue ExtVHeating
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
File(Name="ExtVHeatingFile" Label="External Heating Map File" ShouldExist="true" NumberOfRequiredValues="1" Version="0")
BriefDescription File name of the external volume heating data BriefDescription File name of the external volume heating data
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic] Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
......
...@@ -87,42 +87,37 @@ ...@@ -87,42 +87,37 @@
</AttDef> </AttDef>
<AttDef Type="TEM3PLFDetuning" Label="LF Detuning" BaseType="TEM3PMechanicalBC" Version="0"> <AttDef Type="TEM3PLFDetuning" Label="LF Detuning" BaseType="TEM3PMechanicalBC" Version="0">
<ItemDefinitions> <ItemDefinitions>
<Group Name="Omega3PResults" Label="Omega3P Results" NumberOfRequiredGroups="1" Version="0"> <String Name="NERSCDirectory" Label="NERSC Directory" Version="0">
<BriefDescription>Results data from Omega3P simulation</BriefDescription> <BriefDescription>Full path existing directory on a NERSC file system. where the omega3p results are stored</BriefDescription>
<ItemDefinitions> <Categories>
<String Name="NERSCDirectory" Label="NERSC Directory" Version="0"> <Cat>TEM3P-Harmonic</Cat>
<BriefDescription>Full path existing directory on a NERSC file system. where the omega3p results are stored</BriefDescription> <Cat>TEM3P-Elastic</Cat>
<Categories> <Cat>TEM3P-ThermoElastic</Cat>
<Cat>TEM3P-Harmonic</Cat> </Categories>
<Cat>TEM3P-Elastic</Cat> </String>
<Cat>TEM3P-ThermoElastic</Cat> <Int Name="WhichMode" Label="Mode Number" Version="0">
</Categories> <BriefDescription>The mode number calculated from the omega3p results to be imported into tem3p</BriefDescription>
</String> <Categories>
<Int Name="WhichMode" Label="Mode Number" Version="0"> <Cat>TEM3P-Harmonic</Cat>
<BriefDescription>The mode number calculated from the omega3p results to be imported into tem3p</BriefDescription> <Cat>TEM3P-Elastic</Cat>
<Categories> <Cat>TEM3P-ThermoElastic</Cat>
<Cat>TEM3P-Harmonic</Cat> </Categories>
<Cat>TEM3P-Elastic</Cat> <DefaultValue>0</DefaultValue>
<Cat>TEM3P-ThermoElastic</Cat> <RangeInfo>
</Categories> <Min Inclusive="true">0</Min>
<DefaultValue>0</DefaultValue> </RangeInfo>
<RangeInfo> </Int>
<Min Inclusive="true">0</Min> <Int Name="Omega3PId" Label="Omega3P Id" Version="0">
</RangeInfo> <BriefDescription>Sideset id of the interface surface with Omega3P</BriefDescription>
</Int> <Categories>
<Int Name="Omega3PId" Label="Omega3P Id" Version="0"> <Cat>TEM3P-Harmonic</Cat>
<BriefDescription>Sideset id of the interface surface with Omega3P</BriefDescription> <Cat>TEM3P-Elastic</Cat>
<Categories> <Cat>TEM3P-ThermoElastic</Cat>
<Cat>TEM3P-Harmonic</Cat> </Categories>
<Cat>TEM3P-Elastic</Cat> <RangeInfo>
<Cat>TEM3P-ThermoElastic</Cat> <Min Inclusive="true">0</Min>
</Categories> </RangeInfo>
<RangeInfo> </Int>
<Min Inclusive="true">0</Min>
</RangeInfo>
</Int>
</ItemDefinitions>
</Group>
<String Name="LFDetuningMethod" Label="Method" Version="0"> <String Name="LFDetuningMethod" Label="Method" Version="0">
<BriefDescription>Method to be used for field normalization</BriefDescription> <BriefDescription>Method to be used for field normalization</BriefDescription>
<Categories> <Categories>
...@@ -487,6 +482,7 @@ ...@@ -487,6 +482,7 @@
<DiscreteInfo DefaultIndex="0"> <DiscreteInfo DefaultIndex="0">
<Value Enum="1 = Full Cell">1</Value> <Value Enum="1 = Full Cell">1</Value>
<Value Enum="0 = Half Cell">0</Value> <Value Enum="0 = Half Cell">0</Value>
<Value Enum="3 = Quarter Cell">2</Value>
</DiscreteInfo> </DiscreteInfo>
</Int> </Int>
<String Name="SurfaceResistance" Label="Surface Resistance"> <String Name="SurfaceResistance" Label="Surface Resistance">
......
...@@ -111,7 +111,15 @@ ...@@ -111,7 +111,15 @@
<AttDef Type="ExternalVolumeHeating" Label="External Volume Heating" BaseType="HeatSource" Version="0"> <AttDef Type="ExternalVolumeHeating" Label="External Volume Heating" BaseType="HeatSource" Version="0">
<ItemDefinitions> <ItemDefinitions>
<File Name="DataFile" Label="Data File" ShouldExist="true" NumberOfRequiredValues="1" Version="0"> <String Name="ConditionType" AdvanceLevel="99">
<DefaultValue>ExtVHeating</DefaultValue>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</String>
<File Name="ExtVHeatingFile" Label="External Heating Map File" ShouldExist="true" NumberOfRequiredValues="1" Version="0">
<BriefDescription>File name of the external volume heating data</BriefDescription> <BriefDescription>File name of the external volume heating data</BriefDescription>
<Categories> <Categories>
<Cat>TEM3P-Linear-Thermal</Cat> <Cat>TEM3P-Linear-Thermal</Cat>
......
This diff is collapsed.
...@@ -55,7 +55,7 @@ Linear Solver Type --> CG ...@@ -55,7 +55,7 @@ Linear Solver Type --> CG
Preconditioner ------> DIAGONAL Preconditioner ------> DIAGONAL
Absolute Tolerance --> 1e-18 Absolute Tolerance --> 1e-18
Tolerance -----------> 1e-10 Tolerance -----------> 1e-10
Max Iterations ------> 5000 Max Iterations ------> 5001
## Step 2: Elastic (Thermostatic) Solver Specification ## Step 2: Elastic (Thermostatic) Solver Specification
......
// Generated by CMB 28-Jun-2018 10:07 // Generated by CMB 29-Jun-2018 15:20
ThermoElasticProblem: ThermoElasticProblem:
{ {
...@@ -17,7 +17,7 @@ ThermostaticProblem: ...@@ -17,7 +17,7 @@ ThermostaticProblem:
Preconditioner: DIAGONAL Preconditioner: DIAGONAL
AbsoluteTolerance: 1e-18 AbsoluteTolerance: 1e-18
Tolerance: 1e-10 Tolerance: 1e-10
MaxIterations: 5000 MaxIterations: 5001
} }
PicardSolver: PicardSolver:
...@@ -76,6 +76,7 @@ ThermostaticProblem: ...@@ -76,6 +76,7 @@ ThermostaticProblem:
{ {
Id: 6 Id: 6
ConditionType: RFHeating ConditionType: RFHeating
NERSCDirectory: placeholder
WhichMode: 0 WhichMode: 0
Method: Gradient Method: Gradient
Sigma: 5.8e+07 Sigma: 5.8e+07
...@@ -131,6 +132,7 @@ ElasticProblem: ...@@ -131,6 +132,7 @@ ElasticProblem:
{ {
Id: 6 Id: 6
ConditionType: LFDetuning ConditionType: LFDetuning
NERSCDirectory: placeholder
WhichMode: 0 WhichMode: 0
Omega3PId: 6 Omega3PId: 6
Method: Gradient Method: Gradient
...@@ -168,14 +170,14 @@ ElasticProblem: ...@@ -168,14 +170,14 @@ ElasticProblem:
Boundary: Boundary:
{ {
Id: 4 Id: 5
ConditionType: Neumann ConditionType: Neumann
NeumannValue: 0 NeumannValue: 0
} }
Boundary: Boundary:
{ {
Id: 5 Id: 4
ConditionType: Neumann ConditionType: Neumann
NeumannValue: 0 NeumannValue: 0
} }
......
...@@ -314,7 +314,7 @@ class Tem3PWriter(basewriter.BaseWriter): ...@@ -314,7 +314,7 @@ class Tem3PWriter(basewriter.BaseWriter):
CardFormat('MixedValue').write(self.scope, att, indent=' ') CardFormat('MixedValue').write(self.scope, att, indent=' ')
else: else:
# Other types can use default handling # Other types can use default handling
skip_list = ['PlaceHolder', 'NonlinearConvectiveSurface', 'Source', 'SurfaceResistance'] skip_list = ['PlaceHolder', 'NonlinearConvectiveSurface', 'SurfaceResistance']
self.write_standard_items(att, skip_list=skip_list, keyword_table=keyword_table) self.write_standard_items(att, skip_list=skip_list, keyword_table=keyword_table)
# Special cases: # Special cases:
...@@ -327,7 +327,7 @@ class Tem3PWriter(basewriter.BaseWriter): ...@@ -327,7 +327,7 @@ class Tem3PWriter(basewriter.BaseWriter):
self.scope.output.write(' %sValue: 0.\n' % condition_type) self.scope.output.write(' %sValue: 0.\n' % condition_type)
# Check for LFDetuning case, which requries NERSC directory # Check for LFDetuning case, which requries NERSC directory
if (att.type() == 'TEM3PLFDetuning'): if att.type() == 'TEM3PLFDetuning':
path_item = att.findString('NERSCDirectory') path_item = att.findString('NERSCDirectory')
remote_path = path_item.value(0).rstrip('/') remote_path = path_item.value(0).rstrip('/')
self.set_symlink(remote_path) self.set_symlink(remote_path)
...@@ -452,14 +452,31 @@ class Tem3PWriter(basewriter.BaseWriter): ...@@ -452,14 +452,31 @@ class Tem3PWriter(basewriter.BaseWriter):
for ent_id in ent_idlist: for ent_id in ent_idlist:
self.start_command('HeatSource') self.start_command('HeatSource')
self.scope.output.write(' Id: %s\n' % ent_id) self.scope.output.write(' Id: %s\n' % ent_id)
self.write_standard_items(att, skip_list=['NERSCDirectory']) self.write_standard_items(att, skip_list=['NERSCDirectory', 'ExtVHeatingFile'])
# NERSC directory # NERSC directory for LossyDielectricHeat atts
path_item = att.findString('NERSCDirectory') path_item = att.findString('NERSCDirectory')
remote_path = path_item.value(0).rstrip('/') if path_item is not None:
self.set_symlink(remote_path) remote_path = path_item.value(0).rstrip('/')
basename = os.path.basename(remote_path) self.set_symlink(remote_path)
self.scope.output.write(' Directory: %s\n' % basename) basename = os.path.basename(remote_path)
self.scope.output.write(' Directory: %s\n' % basename)
# ExtVHeatingFile for ExternalVolumeHeating atts
path_item = att.findString('ExtVHeatingFile')
if path_item is not None:
if not path_item.isSet(0):
raise Exception('File not set for Heat Source %s' % att.name())
local_path = path_item.value(0)
if not os.path.exists(local_path):
msg = 'File \"%s\"" not found for Heat Source %s' % (local_path, att.name())
raise Exception(msg)
basename = os.path.basename(local_path)
self.scope.output.write(' ExtVHeatingFile: %s\n' % basename)
# Include file in upload to NERSC
self.scope.folders_to_upload.add(local_path)
self.finish_command() self.finish_command()
......
...@@ -94,7 +94,7 @@ class Track3PWriter(basewriter.BaseWriter): ...@@ -94,7 +94,7 @@ class Track3PWriter(basewriter.BaseWriter):
nersc_item = att.itemAtPath('NERSCDirectory') nersc_item = att.itemAtPath('NERSCDirectory')
remote_path = nersc_item.value(0).rstrip('/') remote_path = nersc_item.value(0).rstrip('/')
if remote_path == '': if remote_path == '':
raise Exception('Field Directory not specified ') raise Exception('Field Directory not specified in Track3P Analysis panel ')
field_dir = os.path.basename(remote_path) field_dir = os.path.basename(remote_path)
self.scope.symlink = remote_path self.scope.symlink = remote_path
...@@ -230,9 +230,9 @@ class Track3PWriter(basewriter.BaseWriter): ...@@ -230,9 +230,9 @@ class Track3PWriter(basewriter.BaseWriter):
type_item = att.findInt('Type') type_item = att.findInt('Type')
if type_item.value(0) == 7: # FieldEmission if type_item.value(0) == 7: # FieldEmission
CardFormat('N', 'N', '%d').write(*args) CardFormat('N', item_path='Type/N', fmt='%d').write(*args)
CardFormat('WorkFunction', 'WorkFunction', '%s').write(*args) CardFormat('WorkFunction', item_path='Type/WorkFunction', fmt='%s').write(*args)
CardFormat('Beta', 'Beta', '%s').write(*args) CardFormat('Beta', item_path='Type/Beta', fmt='%s').write(*args)
self.finish_command() self.finish_command()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment