Commit d7e9e4e4 authored by John Tourtellott's avatar John Tourtellott

Remove sibling options to NERSC directory

Tried to be too cute offering local directory or new O3P/S3P runs
parent 18936b4f
......@@ -58,26 +58,9 @@ SMTK_AttributeSystem(Version="2")
Group(Name="Omega3PResults" Label="Omega3P Results" NumberOfRequiredGroups="1" Version="0")
BriefDescription Results data from Omega3P simulation
ItemDefinitions
String(Name="Source" Label="Source" Version="0")
BriefDescription The source for the omega3p simulation results
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path existing directory on a NERSC file system. where the omega3p results are stored
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
ChildrenDefinitions
Directory(Name="LocalDirectory" Label="Local Directory" Version="0" ShouldExist="true")
BriefDescription An existing directory on the local filesystem, where the omega3p results are stored.
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path existing directory on a NERSC file system. where the omega3p results are stored
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
DiscreteInfo(DefaultIndex="0")
Structure
Value(Enum="Use NERSC Directory") NERSCDirectory
Items
Item NERSCDirectory
Structure
Value(Enum="Use Local Directory") LocalDirectory
Items
Item LocalDirectory
Value(Enum="Run Omega3P Simulation") Omega3P
Int(Name="WhichMode" Label="Mode Number" Version="0")
BriefDescription The mode number calculated from the omega3p results to be imported into tem3p
Categories #[Cat TEM3P-Harmonic] #[Cat TEM3P-Elastic] #[Cat TEM3P-ThermoElastic]
......@@ -216,35 +199,14 @@ SMTK_AttributeSystem(Version="2")
AttDef(Type="TEM3PThermalRFHeating" Label="RF Heating" BaseType="TEM3PThermalBC" Version="0")
ItemDefinitions
Group(Name="EMResults" Label="Electromagnetic Results" NumberOfRequiredGroups="1" Version="0")
BriefDescription Results data from either Omega3P or S3P simulation
ItemDefinitions
String(Name="Source" Label="Source" Version="0")
BriefDescription The source for the omega3p or s3p data simulation results
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
ChildrenDefinitions
Directory(Name="LocalDirectory" Label="Local Directory" Version="0" ShouldExist="true")
BriefDescription An existing directory on the local filesystem, where the omega3p or s3p results are stored.
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path existing directory on a NERSC file system. where the omega3p or s3p results are stored
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
DiscreteInfo(DefaultIndex="3")
Value(Enum="Run Omega3P Simulation") Omega3P
Value(Enum="Run S3P Simulation") S3P
Structure
Value(Enum="Use Local Directory") LocalDirectory
Items
Item LocalDirectory
Structure
Value(Enum="Use NERSC Directory") NERSCDirectory
Items
Item NERSCDirectory
Int(Name="WhichMode" Label="Mode Number" Version="0")
BriefDescription The mode number calculated from the omega3p or s3p data imported into tem3p
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
DefaultValue 0
RangeInfo #[Min(Inclusive="true") 0]
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path to existing directory on a NERSC file system, where omega3p or s3p results are stored
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
Int(Name="WhichMode" Label="Mode Number" Version="0")
BriefDescription The mode number calculated from the omega3p or s3p data imported into tem3p
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
DefaultValue 0
RangeInfo #[Min(Inclusive="true") 0]
String(Name="Method" Label="Method" Version="0")
BriefDescription Method for specifying RF heating
......
......@@ -28,19 +28,9 @@ SMTK_AttributeSystem(Version="2")
BriefDescription The dielectric loss tangent
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
DefaultValue 0.0
String(Name="Source" Label="Source" Version="0")
BriefDescription The source for the omega3p or s3p data simulation results
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path to existing directory on a NERSC file system, where the omega3p or s3p results are stored
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
ChildrenDefinitions
String(Name="NERSCDirectory" Label="NERSC Directory" Version="0")
BriefDescription Full path existing directory on a NERSC file system. where the omega3p or s3p results are stored
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
DiscreteInfo(DefaultIndex="0")
Structure
Value(Enum="Use NERSC Directory") NERSCDirectory
Items
Item NERSCDirectory
Int(Name="WhichMode" Label="Mode Number" Version="0")
BriefDescription The mode number calculated from the omega3p or s3p data imported into tem3p
Categories #[Cat TEM3P-Linear-Thermal] #[Cat TEM3P-Nonlinear-Thermal] #[Cat TEM3P-ThermoElastic]
......@@ -69,7 +59,7 @@ SMTK_AttributeSystem(Version="2")
Items
Item DielectricConstantE
Item LossTangentE
Item Source
Item NERSCDirectory
Item WhichMode
Item Method
......
......@@ -90,46 +90,13 @@
<Group Name="Omega3PResults" Label="Omega3P Results" NumberOfRequiredGroups="1" Version="0">
<BriefDescription>Results data from Omega3P simulation</BriefDescription>
<ItemDefinitions>
<String Name="Source" Label="Source" Version="0">
<BriefDescription> The source for the omega3p simulation results</BriefDescription>
<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>
<Categories>
<Cat>TEM3P-Harmonic</Cat>
<Cat>TEM3P-Elastic</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
<ChildrenDefinitions>
<Directory Name="LocalDirectory" Label="Local Directory" Version="0" ShouldExist="true">
<BriefDescription>An existing directory on the local filesystem, where the omega3p results are stored.</BriefDescription>
<Categories>
<Cat>TEM3P-Harmonic</Cat>
<Cat>TEM3P-Elastic</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</Directory>
<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>
<Categories>
<Cat>TEM3P-Harmonic</Cat>
<Cat>TEM3P-Elastic</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</String>
</ChildrenDefinitions>
<DiscreteInfo DefaultIndex="0">
<Structure>
<Value Enum="Use NERSC Directory">NERSCDirectory</Value>
<Items>
<Item>NERSCDirectory</Item>
</Items>
</Structure>
<Structure>
<Value Enum="Use Local Directory">LocalDirectory</Value>
<Items>
<Item>LocalDirectory</Item>
</Items>
</Structure>
<Value Enum="Run Omega3P Simulation">Omega3P</Value>
</DiscreteInfo>
</String>
<Int Name="WhichMode" Label="Mode Number" Version="0">
<BriefDescription>The mode number calculated from the omega3p results to be imported into tem3p</BriefDescription>
......@@ -385,65 +352,26 @@
</AttDef>
<AttDef Type="TEM3PThermalRFHeating" Label="RF Heating" BaseType="TEM3PThermalBC" Version="0">
<ItemDefinitions>
<Group Name="EMResults" Label="Electromagnetic Results" NumberOfRequiredGroups="1" Version="0">
<BriefDescription>Results data from either Omega3P or S3P simulation</BriefDescription>
<ItemDefinitions>
<String Name="Source" Label="Source" Version="0">
<BriefDescription> The source for the omega3p or s3p data simulation results</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
<ChildrenDefinitions>
<Directory Name="LocalDirectory" Label="Local Directory" Version="0" ShouldExist="true">
<BriefDescription>An existing directory on the local filesystem, where the omega3p or s3p results are stored.</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</Directory>
<String Name="NERSCDirectory" Label="NERSC Directory" Version="0">
<BriefDescription>Full path existing directory on a NERSC file system. where the omega3p or s3p results are stored</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</String>
</ChildrenDefinitions>
<DiscreteInfo DefaultIndex="3">
<Value Enum="Run Omega3P Simulation">Omega3P</Value>
<Value Enum="Run S3P Simulation">S3P</Value>
<Structure>
<Value Enum="Use Local Directory">LocalDirectory</Value>
<Items>
<Item>LocalDirectory</Item>
</Items>
</Structure>
<Structure>
<Value Enum="Use NERSC Directory">NERSCDirectory</Value>
<Items>
<Item>NERSCDirectory</Item>
</Items>
</Structure>
</DiscreteInfo>
</String>
<Int Name="WhichMode" Label="Mode Number" Version="0">
<BriefDescription>The mode number calculated from the omega3p or s3p data imported into tem3p</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
<RangeInfo>
<Min Inclusive="true">0</Min>
</RangeInfo>
</Int>
</ItemDefinitions>
</Group>
<String Name="NERSCDirectory" Label="NERSC Directory" Version="0">
<BriefDescription>Full path to existing directory on a NERSC file system, where omega3p or s3p results are stored</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</String>
<Int Name="WhichMode" Label="Mode Number" Version="0">
<BriefDescription>The mode number calculated from the omega3p or s3p data imported into tem3p</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
<DefaultValue>0</DefaultValue>
<RangeInfo>
<Min Inclusive="true">0</Min>
</RangeInfo>
</Int>
<String Name="Method" Label="Method" Version="0">
<BriefDescription>Method for specifying RF heating</BriefDescription>
<Categories>
......
......@@ -44,31 +44,13 @@
</Categories>
<DefaultValue>0.0</DefaultValue>
</Double>
<String Name="Source" Label="Source" Version="0">
<BriefDescription> The source for the omega3p or s3p data simulation results</BriefDescription>
<String Name="NERSCDirectory" Label="NERSC Directory" Version="0">
<BriefDescription>Full path to existing directory on a NERSC file system, where the omega3p or s3p results are stored</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
<ChildrenDefinitions>
<String Name="NERSCDirectory" Label="NERSC Directory" Version="0">
<BriefDescription>Full path existing directory on a NERSC file system. where the omega3p or s3p results are stored</BriefDescription>
<Categories>
<Cat>TEM3P-Linear-Thermal</Cat>
<Cat>TEM3P-Nonlinear-Thermal</Cat>
<Cat>TEM3P-ThermoElastic</Cat>
</Categories>
</String>
</ChildrenDefinitions>
<DiscreteInfo DefaultIndex="0">
<Structure>
<Value Enum="Use NERSC Directory">NERSCDirectory</Value>
<Items>
<Item>NERSCDirectory</Item>
</Items>
</Structure>
</DiscreteInfo>
</String>
<Int Name="WhichMode" Label="Mode Number" Version="0">
<BriefDescription>The mode number calculated from the omega3p or s3p data imported into tem3p</BriefDescription>
......@@ -117,7 +99,7 @@
<Items>
<Item>DielectricConstantE</Item>
<Item>LossTangentE</Item>
<Item>Source</Item>
<Item>NERSCDirectory</Item>
<Item>WhichMode</Item>
<Item>Method</Item>
</Items>
......
......@@ -8,16 +8,18 @@ Set category to Omega3P
## Boundary conditions
Exterior --> New, side set 6
Conductivity ->>5.811e+07
side set 1 ------> Magnetic
side set 2 ------> Magnetic
side set 6 ------> Exterior
Conductivity --> 5.78e+07
Magnetic --> side set 1, side set 2
## Materials
Material --> New, element block 1
Relative Permittivity (Epsilon) --> 0.99
Relative Permeability (Mu) --> 0.98
Relative Permittivity (Epsilon) --> 0.99
Relative Permeability (Mu) --> 0.98
## Analysis
......
......@@ -326,15 +326,21 @@ class Tem3PWriter(basewriter.BaseWriter):
else:
self.scope.output.write(' %sValue: 0.\n' % condition_type)
# Check for LFDetuning case, which uses Source
# Check for LFDetuning case, which requries NERSC directory
if (att.type() == 'TEM3PLFDetuning'):
source_item = att.itemAtPath('Omega3PResults/Source', '/')
self.write_em_source(source_item)
path_item = att.findString('NERSCDirectory')
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)
# Check for RFHeating case, which uses Source and optional nonlinear properties
elif (att.type() == 'TEM3PThermalRFHeating'):
source_item = att.itemAtPath('EMResults/Source', '/')
self.write_em_source(source_item)
path_item = att.findString('NERSCDirectory')
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)
surface_res_item = att.findString('SurfaceResistance')
if surface_res_item.isEnabled() and surface_res_item.isSet(0):
......@@ -446,9 +452,15 @@ 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=['Source'])
source_item = att.findString('Source')
self.write_em_source(source_item)
self.write_standard_items(att, skip_list=['NERSCDirectory'])
# NERSC directory
path_item = att.findString('NERSCDirectory')
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)
self.finish_command()
......@@ -456,34 +468,6 @@ class Tem3PWriter(basewriter.BaseWriter):
print 'Writing harmonic analysis'
self.write_standard_instance_att('HarmonicAnalysis', silent_list=['Frequency'])
def write_em_source(self, source_item, keyword='Directory', indent=' '):
'''Writes LocalDirectory or NERSCDirectory item
'''
source_value = source_item.value()
#print 'source_value: %s' % source_value
if source_value == 'LocalDirectory':
local_item = source_item.findChild('LocalDirectory', smtk.attribute.ACTIVE_CHILDREN)
local_path = local_item.value(0).rstrip('/')
# Check that folder exists
if not os.path.exists(local_path):
msg = 'ERROR: Local data directory not found at %s' % local_path
self.scope.logger.addError(msg)
raise Exception(msg)
field_dir = os.path.basename(local_path)
# Add flag to upload folder to NERSC
self.scope.folders_to_upload.add(local_path)
elif source_value == 'NERSCDirectory':
nersc_item = source_item.findChild('NERSCDirectory', smtk.attribute.ACTIVE_CHILDREN)
remote_path = nersc_item.value(0).rstrip('/')
self.set_symlink(remote_path)
field_dir = os.path.basename(remote_path)
else:
raise Exception('Unrecognized source value %s' % source_value)
self.scope.output.write('%s%s: %s\n' % (indent, keyword, field_dir))
def parse_thermal_conductivity(self, att, linear_item_name, general_item_name):
'''Parses the different ways for specifying thermal conductivity
......
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