OOF.Microstructure.Create_From_ImageFile(filename='statemapredbluesmall.png', microstructure_name='statemapredbluesmall.png', height=automatic, width=automatic)
OOF.Windows.Graphics.New()
OOF.Graphics_1.Toolbox.Pixel_Info.Query(x=51, y=131)
OOF.Graphics_1.Settings.Zoom.Fill_Window()
OOF.Graphics_1.Toolbox.Pixel_Select.Rectangle(source='statemapredbluesmall.png:statemapredbluesmall.png', points=[Point(43.7556,170.644), Point(156.633,111.948)], shift=0, ctrl=0)
OOF.Graphics_1.Toolbox.Pixel_Select.Clear(source='statemapredbluesmall.png:statemapredbluesmall.png')
OOF.Graphics_1.Toolbox.Pixel_Select.Circle(source='statemapredbluesmall.png:statemapredbluesmall.png', points=[Point(155.73,149.875), Point(193.657,104.724)], shift=0, ctrl=0)
OOF.Graphics_1.Toolbox.Pixel_Select.Clear(source='statemapredbluesmall.png:statemapredbluesmall.png')
OOF.Graphics_1.Toolbox.Pixel_Select.Burn(source='statemapredbluesmall.png:statemapredbluesmall.png', local_flammability=0.10000000000000001, global_flammability=0.20000000000000001, color_space_norm='L1', next_nearest=False, points=[Point(26.5981,108.336)], shift=0, ctrl=0)
OOF.Graphics_1.Toolbox.Pixel_Select.Burn(source='statemapredbluesmall.png:statemapredbluesmall.png', local_flammability=0.10000000000000001, global_flammability=0.20000000000000001, color_space_norm='L1', next_nearest=False, points=[Point(198.173,164.323)], shift=0, ctrl=1)
OOF.Graphics_1.Toolbox.Pixel_Select.Burn(source='statemapredbluesmall.png:statemapredbluesmall.png', local_flammability=0.10000000000000001, global_flammability=0.20000000000000001, color_space_norm='L1', next_nearest=False, points=[Point(250.548,152.584)], shift=0, ctrl=1)
OOF.Graphics_1.Toolbox.Pixel_Select.Burn(source='statemapredbluesmall.png:statemapredbluesmall.png', local_flammability=0.10000000000000001, global_flammability=0.20000000000000001, color_space_norm='L1', next_nearest=False, points=[Point(292.087,141.748)], shift=0, ctrl=1)
OOF.Graphics_1.Toolbox.Pixel_Select.Burn(source='statemapredbluesmall.png:statemapredbluesmall.png', local_flammability=0.10000000000000001, global_flammability=0.20000000000000001, color_space_norm='L1', next_nearest=False, points=[Point(319.178,145.36)], shift=0, ctrl=1)
OOF.Graphics_1.Toolbox.Pixel_Select.Burn(source='statemapredbluesmall.png:statemapredbluesmall.png', local_flammability=0.10000000000000001, global_flammability=0.20000000000000001, color_space_norm='L1', next_nearest=False, points=[Point(320.984,144.457)], shift=0, ctrl=1)
OOF.PixelGroup.New(name='bluegroup', microstructure='statemapredbluesmall.png')
OOF.PixelGroup.AddSelection(microstructure='statemapredbluesmall.png', group='bluegroup')
OOF.Graphics_1.Toolbox.Pixel_Select.Clear(source='statemapredbluesmall.png:statemapredbluesmall.png')
OOF.Graphics_1.Toolbox.Pixel_Select.Color(source='statemapredbluesmall.png:statemapredbluesmall.png', range=DeltaRGB(delta_red=0,delta_green=0,delta_blue=0), points=[Point(129.543,210.377)], shift=0, ctrl=0)
OOF.PixelGroup.New(name='whitegroup', microstructure='statemapredbluesmall.png')
OOF.PixelGroup.AddSelection(microstructure='statemapredbluesmall.png', group='whitegroup')
OOF.Graphics_1.Toolbox.Pixel_Select.Clear(source='statemapredbluesmall.png:statemapredbluesmall.png')
OOF.Graphics_1.Toolbox.Pixel_Select.Color(source='statemapredbluesmall.png:statemapredbluesmall.png', range=DeltaRGB(delta_red=0,delta_green=0,delta_blue=0), points=[Point(112.385,118.269)], shift=0, ctrl=0)
OOF.PixelGroup.New(name='redgroup', microstructure='statemapredbluesmall.png')
OOF.PixelGroup.AddSelection(microstructure='statemapredbluesmall.png', group='redgroup')
OOF.Graphics_1.Settings.Color.Background(color=Gray(value=0.0))
OOF.Graphics_1.Settings.Color.Background(color=Gray(value=1.0))
OOF.Material.New(name='redmaterial')
OOF.Material.New(name='bluematerial')
OOF.Material.New(name='whitematerial')
OOF.Graphics_1.Toolbox.Pixel_Select.Color(source='statemapredbluesmall.png:statemapredbluesmall.png', range=DeltaRGB(delta_red=0,delta_green=0,delta_blue=0), points=[Point(212.621,1.77907)], shift=0, ctrl=0)
OOF.Graphics_1.Toolbox.Pixel_Select.Clear(source='statemapredbluesmall.png:statemapredbluesmall.png')
OOF.Property.Copy(property='Color', new_name='redcolor')
OOF.Property.Copy(property='Color:redcolor', new_name='bluecolor')
OOF.Property.Copy(property='Color:bluecolor', new_name='greencolor')
OOF.Property.Parametrize.Color.redcolor(color=RGBColor(red=1,green=0,blue=0))
OOF.Property.Parametrize.Color.bluecolor(color=RGBColor(red=0,green=0,blue=1))
OOF.Property.Parametrize.Color.greencolor(color=RGBColor(red=0,green=1,blue=0))
OOF.Property.Copy(property='Mechanical:Elasticity:Isotropic', new_name='YoungPoisson')
OOF.Property.Parametrize.Mechanical.Elasticity.Isotropic.YoungPoisson(cijkl=IsotropicRank4TensorEnu(young=0.66666666666666663,poisson=0.33333333333333331))
OOF.Property.Copy(property='Thermal:Conductivity:Isotropic', new_name='k')
OOF.Property.Parametrize.Thermal.Conductivity.Isotropic.k(kappa=1.0)
OOF.Property.Copy(property='Couplings:ThermalExpansion:Isotropic', new_name='redalpha')
OOF.Property.Copy(property='Couplings:ThermalExpansion:Isotropic:redalpha', new_name='bluealpha')
OOF.Property.Copy(property='Couplings:ThermalExpansion:Isotropic:bluealpha', new_name='whitealpha')
OOF.Property.Parametrize.Couplings.ThermalExpansion.Isotropic.redalpha(alpha=-1.0, T0=0.0)
OOF.Property.Parametrize.Couplings.ThermalExpansion.Isotropic.bluealpha(alpha=1.0, T0=0.0)
OOF.Property.Parametrize.Couplings.ThermalExpansion.Isotropic.whitealpha(alpha=0, T0=0.0)
OOF.Material.Add_property(name='redmaterial', property='Couplings:ThermalExpansion:Isotropic:redalpha')
OOF.Material.Add_property(name='redmaterial', property='Thermal:Conductivity:Isotropic:k')
OOF.Material.Add_property(name='redmaterial', property='Mechanical:Elasticity:Isotropic:YoungPoisson')
OOF.Material.Add_property(name='redmaterial', property='Color:redcolor')
OOF.Material.Add_property(name='bluematerial', property='Color:bluecolor')
OOF.Material.Add_property(name='bluematerial', property='Mechanical:Elasticity:Isotropic:YoungPoisson')
OOF.Material.Add_property(name='bluematerial', property='Thermal:Conductivity:Isotropic:k')
OOF.Material.Add_property(name='bluematerial', property='Couplings:ThermalExpansion:Isotropic:bluealpha')
OOF.Material.Add_property(name='whitematerial', property='Couplings:ThermalExpansion:Isotropic:whitealpha')
OOF.Material.Add_property(name='whitematerial', property='Thermal:Conductivity:Isotropic:k')
OOF.Material.Add_property(name='whitematerial', property='Mechanical:Elasticity:Isotropic:YoungPoisson')
OOF.Material.Add_property(name='whitematerial', property='Color:greencolor')
OOF.Material.Assign(material='whitematerial', microstructure='statemapredbluesmall.png', pixels='whitegroup')
OOF.Material.Assign(material='bluematerial', microstructure='statemapredbluesmall.png', pixels='bluegroup')
OOF.Material.Assign(material='redmaterial', microstructure='statemapredbluesmall.png', pixels='redgroup')
OOF.Skeleton.New(name='skeleton', microstructure='statemapredbluesmall.png', x_elements=20, y_elements=10, skeleton_geometry=QuadSkeleton())
OOF.Skeleton.Modify(skeleton='statemapredbluesmall.png:skeleton', modifier=Refine(targets=CheckHomogeneity(threshold=0.90000000000000002),criterion=Unconditionally(),degree=Trisection(rule_set='conservative'),alpha=0.29999999999999999))
OOF.Graphics_1.Toolbox.Pixel_Select.Rectangle(source='statemapredbluesmall.png:statemapredbluesmall.png', points=[Point(143.991,24.3547), Point(182.821,-5.44512)], shift=0, ctrl=0)
OOF.Graphics_1.Toolbox.Select_Element.Rectangle(skeleton='statemapredbluesmall.png:skeleton', points=[Point(140.379,29.7728), Point(190.045,-1.83302)], shift=0, ctrl=0)
OOF.Graphics_1.Toolbox.Select_Element.Clear(skeleton='statemapredbluesmall.png:skeleton')
OOF.Graphics_1.Toolbox.Pixel_Select.Clear(source='statemapredbluesmall.png:statemapredbluesmall.png')
OOF.Graphics_1.Toolbox.Select_Segment.Rectangle(skeleton='statemapredbluesmall.png:skeleton', points=[Point(143.991,31.5788), Point(184.627,-2.73605)], shift=0, ctrl=0)
OOF.Skeleton.Modify(skeleton='statemapredbluesmall.png:skeleton', modifier=Refine(targets=CheckHomogeneity(threshold=0.90000000000000002),criterion=Unconditionally(),degree=Trisection(rule_set='conservative'),alpha=0.29999999999999999))
OOF.Skeleton.Undo(skeleton='statemapredbluesmall.png:skeleton')
OOF.Skeleton.Modify(skeleton='statemapredbluesmall.png:skeleton', modifier=Refine(targets=CheckSelectedEdges(),criterion=Unconditionally(),degree=Trisection(rule_set='conservative'),alpha=0.29999999999999999))
OOF.Graphics_1.Toolbox.Select_Segment.Clear(skeleton='statemapredbluesmall.png:skeleton')
OOF.Skeleton.Undo(skeleton='statemapredbluesmall.png:skeleton')
OOF.Mesh.New(name='mesh', skeleton='statemapredbluesmall.png:skeleton', element_types=['T3_3', 'Q4_4'])
OOF.Graphics_1.Layer.Hide(n=5)
OOF.Graphics_1.Layer.Select(n=5)
OOF.Graphics_1.Layer.Hide(n=0)
OOF.Graphics_1.Layer.Select(n=0)
OOF.Graphics_1.Layer.Show(n=5)
OOF.Graphics_1.Layer.Select(n=5)
OOF.Graphics_1.Layer.Show(n=0)
OOF.Graphics_1.Layer.Select(n=0)
OOF.Mesh.Field.Define(mesh='statemapredbluesmall.png:skeleton:mesh', field=Temperature)
OOF.Mesh.Field.Activate(mesh='statemapredbluesmall.png:skeleton:mesh', field=Temperature)
OOF.Mesh.Field.In_Plane(mesh='statemapredbluesmall.png:skeleton:mesh', field=Temperature)
OOF.Mesh.Field.Define(mesh='statemapredbluesmall.png:skeleton:mesh', field=Displacement)
OOF.Mesh.Field.Activate(mesh='statemapredbluesmall.png:skeleton:mesh', field=Displacement)
OOF.Mesh.Field.In_Plane(mesh='statemapredbluesmall.png:skeleton:mesh', field=Displacement)
OOF.Mesh.Equation.Activate(mesh='statemapredbluesmall.png:skeleton:mesh', equation=Heat_Eqn)
OOF.Mesh.Equation.Activate(mesh='statemapredbluesmall.png:skeleton:mesh', equation=Force_Balance)
OOF.Mesh.Boundary_Conditions.New(name='bc', mesh='statemapredbluesmall.png:skeleton:mesh', condition=DirichletBC(field=Temperature,field_component='',equation=Heat_Eqn,eqn_component='',profile=ContinuumProfile(function='0.3'),boundary='top'))
OOF.Mesh.Boundary_Conditions.New(name='bc<2>', mesh='statemapredbluesmall.png:skeleton:mesh', condition=DirichletBC(field=Temperature,field_component='',equation=Heat_Eqn,eqn_component='',profile=ContinuumProfile(function='0.6'),boundary='bottom'))
OOF.Mesh.Boundary_Conditions.New(name='bc<3>', mesh='statemapredbluesmall.png:skeleton:mesh', condition=DirichletBC(field=Displacement,field_component='y',equation=Force_Balance,eqn_component='y',profile=ConstantProfile(value=0.0),boundary='bottom'))
OOF.Mesh.Boundary_Conditions.New(name='bc<4>', mesh='statemapredbluesmall.png:skeleton:mesh', condition=DirichletBC(field=Displacement,field_component='y',equation=Force_Balance,eqn_component='y',profile=ConstantProfile(value=0.0),boundary='top'))
OOF.Mesh.Boundary_Conditions.New(name='bc<5>', mesh='statemapredbluesmall.png:skeleton:mesh', condition=DirichletBC(field=Displacement,field_component='x',equation=Force_Balance,eqn_component='x',profile=ConstantProfile(value=0.0),boundary='left'))
OOF.Mesh.Boundary_Conditions.New(name='bc<6>', mesh='statemapredbluesmall.png:skeleton:mesh', condition=DirichletBC(field=Displacement,field_component='x',equation=Force_Balance,eqn_component='x',profile=ConstantProfile(value=0.0),boundary='right'))
OOF.Solver.Solve(mesh='statemapredbluesmall.png:skeleton:mesh', solver=LinearDriver(method=GMRESSolver(max_iterations=1000,krylov_dimension=100,tolerance=1e-13,preconditioner=ILUPreconditioner())))
OOF.Mesh.Analyze.Direct_Output(mesh='statemapredbluesmall.png:skeleton:mesh', data=getOutput('Field:Component',component='',field=Temperature), domain=EntireMesh(), sampling=GridSampleSet(x_points=10,y_points=10,show_x=True,show_y=True), destination=automatic, comment_character='#', separator='comma')
OOF.Graphics_1.Settings.Scroll.Horizontal(position=0.0)
OOF.LayerEditor.LayerSet.New(window='Graphics_1')
OOF.LayerEditor.LayerSet.DisplayedObject(category='Mesh', object='statemapredbluesmall.png:skeleton:mesh')
OOF.LayerEditor.LayerSet.Add_Method(method=FilledContourDisplay(what=getOutput('Field:Component',component='',field=Temperature),where=getOutput('original'),min=automatic,max=automatic,levels=11,nbins=5,colormap=ThermalMap()))
OOF.LayerEditor.LayerSet.Send(window='Graphics_1')
OOF.LayerEditor.LayerSet.Replace_Method(layer_number=0, method=MeshMaterialDisplay(where=getOutput('actual')))
OOF.LayerEditor.LayerSet.Send(window='Graphics_1')
OOF.Graphics_1.Settings.Scroll.Vertical(position=0.0)