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 @@
<View Type="Group" Title="TEM3P Thermal Linear" TabPosition="North" TabIcons="false">
<Views>
<View Title="TEM3P Thermal BC" />
<View Title="TEM3P Thermal Material" />
<View Title="TEM3P Thermal Analysis"/>
<View Title="Thermal Shells" />
<View Title="TEM3P Thermal Material" />
<View Title="Heat Sources" />
<View Title="TEM3P Thermal Analysis"/>
</Views>
</View>
<View Type="Group" Title="TEM3P Thermal Nonlinear" TabPosition="North" TabIcons="false">
<Views>
<View Title="TEM3P Thermal BC" />
<View Title="TEM3P Thermal Material" />
<View Title="TEM3P Thermal Analysis"/>
<View Title="Thermal Shells" />
<View Title="TEM3P Thermal Material" />
<View Title="Heat Sources" />
<View Title="TEM3P Thermal Analysis"/>
</Views>
</View>
......
......@@ -54,9 +54,6 @@ SMTK_AttributeSystem(Version="2")
DefaultValue 0,0,0
AttDef(Type="TEM3PLFDetuning" Label="LF Detuning" BaseType="TEM3PMechanicalBC" Version="0")
ItemDefinitions
Group(Name="Omega3PResults" Label="Omega3P Results" NumberOfRequiredGroups="1" Version="0")
BriefDescription Results data from Omega3P simulation
ItemDefinitions
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path existing directory on a NERSC file system. where the omega3p results are stored
......@@ -268,6 +265,7 @@ SMTK_AttributeSystem(Version="2")
DiscreteInfo(DefaultIndex=0)
Value(Enum="1 = Full Cell") 1
Value(Enum="0 = Half Cell") 0
Value(Enum="3 = Quarter Cell") 2
String(Name="SurfaceResistance" Label="Surface Resistance")
BriefDescription Nonlinear surface resistance
......
......@@ -66,7 +66,11 @@ SMTK_AttributeSystem(Version="2")
= '\n'
AttDef(Type="ExternalVolumeHeating" Label="External Volume Heating" BaseType="HeatSource" Version="0")
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
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
......
......@@ -86,9 +86,6 @@
</ItemDefinitions>
</AttDef>
<AttDef Type="TEM3PLFDetuning" Label="LF Detuning" BaseType="TEM3PMechanicalBC" Version="0">
<ItemDefinitions>
<Group Name="Omega3PResults" Label="Omega3P Results" NumberOfRequiredGroups="1" Version="0">
<BriefDescription>Results data from Omega3P simulation</BriefDescription>
<ItemDefinitions>
<String Name="NERSCDirectory" Label="NERSC Directory" Version="0">
<BriefDescription>Full path existing directory on a NERSC file system. where the omega3p results are stored</BriefDescription>
......@@ -121,8 +118,6 @@
<Min Inclusive="true">0</Min>
</RangeInfo>
</Int>
</ItemDefinitions>
</Group>
<String Name="LFDetuningMethod" Label="Method" Version="0">
<BriefDescription>Method to be used for field normalization</BriefDescription>
<Categories>
......@@ -487,6 +482,7 @@
<DiscreteInfo DefaultIndex="0">
<Value Enum="1 = Full Cell">1</Value>
<Value Enum="0 = Half Cell">0</Value>
<Value Enum="3 = Quarter Cell">2</Value>
</DiscreteInfo>
</Int>
<String Name="SurfaceResistance" Label="Surface Resistance">
......
......@@ -111,7 +111,15 @@
<AttDef Type="ExternalVolumeHeating" Label="External Volume Heating" BaseType="HeatSource" Version="0">
<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>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
......
This diff is collapsed.
......@@ -55,7 +55,7 @@ Linear Solver Type --> CG
Preconditioner ------> DIAGONAL
Absolute Tolerance --> 1e-18
Tolerance -----------> 1e-10
Max Iterations ------> 5000
Max Iterations ------> 5001
## Step 2: Elastic (Thermostatic) Solver Specification
......
// Generated by CMB 28-Jun-2018 10:07
// Generated by CMB 29-Jun-2018 15:20
ThermoElasticProblem:
{
......@@ -17,7 +17,7 @@ ThermostaticProblem:
Preconditioner: DIAGONAL
AbsoluteTolerance: 1e-18
Tolerance: 1e-10
MaxIterations: 5000
MaxIterations: 5001
}
PicardSolver:
......@@ -76,6 +76,7 @@ ThermostaticProblem:
{
Id: 6
ConditionType: RFHeating
NERSCDirectory: placeholder
WhichMode: 0
Method: Gradient
Sigma: 5.8e+07
......@@ -131,6 +132,7 @@ ElasticProblem:
{
Id: 6
ConditionType: LFDetuning
NERSCDirectory: placeholder
WhichMode: 0
Omega3PId: 6
Method: Gradient
......@@ -168,14 +170,14 @@ ElasticProblem:
Boundary:
{
Id: 4
Id: 5
ConditionType: Neumann
NeumannValue: 0
}
Boundary:
{
Id: 5
Id: 4
ConditionType: Neumann
NeumannValue: 0
}
......
......@@ -314,7 +314,7 @@ class Tem3PWriter(basewriter.BaseWriter):
CardFormat('MixedValue').write(self.scope, att, indent=' ')
else:
# 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)
# Special cases:
......@@ -327,7 +327,7 @@ class Tem3PWriter(basewriter.BaseWriter):
self.scope.output.write(' %sValue: 0.\n' % condition_type)
# Check for LFDetuning case, which requries NERSC directory
if (att.type() == 'TEM3PLFDetuning'):
if att.type() == 'TEM3PLFDetuning':
path_item = att.findString('NERSCDirectory')
remote_path = path_item.value(0).rstrip('/')
self.set_symlink(remote_path)
......@@ -452,15 +452,32 @@ class Tem3PWriter(basewriter.BaseWriter):
for ent_id in ent_idlist:
self.start_command('HeatSource')
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')
if path_item is not None:
remote_path = path_item.value(0).rstrip('/')
self.set_symlink(remote_path)
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()
......
......@@ -94,7 +94,7 @@ class Track3PWriter(basewriter.BaseWriter):
nersc_item = att.itemAtPath('NERSCDirectory')
remote_path = nersc_item.value(0).rstrip('/')
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)
self.scope.symlink = remote_path
......@@ -230,9 +230,9 @@ class Track3PWriter(basewriter.BaseWriter):
type_item = att.findInt('Type')
if type_item.value(0) == 7: # FieldEmission
CardFormat('N', 'N', '%d').write(*args)
CardFormat('WorkFunction', 'WorkFunction', '%s').write(*args)
CardFormat('Beta', 'Beta', '%s').write(*args)
CardFormat('N', item_path='Type/N', fmt='%d').write(*args)
CardFormat('WorkFunction', item_path='Type/WorkFunction', fmt='%s').write(*args)
CardFormat('Beta', item_path='Type/Beta', fmt='%s').write(*args)
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