# Input File for FEM Simulation with Mesh Reference

## Mesh mesh_file <name.msh> <physical_entity_final_mesh_name>
#mesh_file C:/Archive/Programming/MATLAB/TOTEM_M/TECTO/TEC_Parameterized_NElem_Hex.inp Volume mm
mesh_file C:/Archive/Programming/MATLAB/TOTEM_M/TECTO/TEC_Parameterized_NElem_Serendipity_Gmsh_5el.inp Volume mm

rst_folder C:/Archive/Programming/MATLAB/TOTEM_M/TECTO/Results/
physics decoupledthermoelectromechanical
solver NR
InitialTemperature 298.15

## Bi2Te3 Mechanical Properties: https://repository.bilkent.edu.tr/server/api/core/bitstreams/502cdf62-9b13-4faf-b245-8196af9e81ab/content
## Bi2Te3 Thermal Expansion: https://www.researchgate.net/publication/227109210_Thermal_expansion_of_bismuth_telluride
## Bi2Te3 Thermal Expansion: https://www.physics.purdue.edu/quantum/files/XChen_expansion_apl11.pdf
## Bi2Te3 Thermoelectric Properties: https://link.springer.com/article/10.1007/s11664-015-3898-y
## Copper Mechanical Properties: https://www.mit.edu/~6.777/matprops/copper.htm
## Solder Mechanical Properties: https://www.metallurgy.nist.gov/solder/clech/Sn-Ag-Cu_Other.htm#Young , https://www.jstage.jst.go.jp/article/matertrans/46/6/46_6_1271/_pdf , https://www.electronics-cooling.com/2006/08/thermal-conductivity-of-solders/
## Copper Electrical Properties: 
## Solder Electrical Properties: https://us.rs-online.com/m/d/8d9ef1f686bf70839a288bf4fd8e669e.pdf
## MATERIAL PROPERTIES: material <volumename> \n <propertyname> <value> \n ... 
##
material SemiconductorP+
Seebeck 0 0.0002171645
Penalty_Seebeck 0 1
ThermalConductivity 0 1.054963
Penalty_ThermalConductivity 0 3
ElectricalConductivity  0 68829.89
Penalty_ElectricalConductivity 0 3
ThermalExpansionCoefficient_x 0 15E-6
ThermalExpansionCoefficient_y 0 15E-6
ThermalExpansionCoefficient_z 0 15E-6
YoungModulus 0 61.6E9
Penalty_YoungModulus 0 5
PoissonRatio 0 0.241

material SemiconductorN-
Seebeck 0 -0.0001985263
Penalty_Seebeck 0 1
ThermalConductivity 0 1.305023
Penalty_ThermalConductivity 0 3
ElectricalConductivity 0 76897.2867561341
Penalty_ElectricalConductivity 0 3
ThermalExpansionCoefficient_x 0 15E-6
ThermalExpansionCoefficient_y 0 15E-6
ThermalExpansionCoefficient_z 0 15E-6
YoungModulus 0 61.6E9
Penalty_YoungModulus 0 5
PoissonRatio 0 0.241

material Copper
Seebeck 0 0
ThermalConductivity 0 385
ElectricalConductivity 0 59880239.52095808
ThermalExpansionCoefficient_x 0 17E-6
ThermalExpansionCoefficient_y 0 17E-6
ThermalExpansionCoefficient_z 0 17E-6
YoungModulus 0 130E9
PoissonRatio 0 0.34

material Solder
Seebeck 0 0
ThermalConductivity 0 385
ElectricalConductivity 0 59880239.52095808
ThermalExpansionCoefficient_x 0 17E-6
ThermalExpansionCoefficient_y 0 17E-6
ThermalExpansionCoefficient_z 0 17E-6
YoungModulus 0 130E9
PoissonRatio 0 0.34

## Boundary Conditions: bc <boundaryname> <surfacename> <value>
bc Voltage ElectrodeMinX 0.0625
bc Voltage ElectrodeMaxX 0.0
bc Temperature HeatSink 298
bc Displacement_x HeatSink 0
bc Displacement_y HeatSink 0
bc Displacement_z HeatSink 0
#bc Pressure_y Qin -0.83E6
bc heat_n Qin 5333
bc Pressure_y Qin -0.9E6


## Topopoly Optimization Objective: TopOpt_Objective <ObjectiveName> <SurfaceName> <DesignElements>
TopOpt_Objective AverageTemperature Qin TO
## Topopoly Optimization Extra Variable (bc): TopOpt_Variable <bctype> <SurfaceName> <minval> <initialval> <maxval> 
TopOpt_bc Voltage ElectrodeMinX 0.0125 0.0625 0.125
## Topopoly Optimization Intial densities: TopOpt_Initial_x <value(0,1](if<0, random values )>
TopOpt_Initial_x 0.5
## Topopoly Optimization NR start point: TopOpt_Initial_x <value(0,1](if<0, random values )>
TopOpt_NR T previous  
TopOpt_NR V proporcional
## Topopoly Optimization Constraints
TopOpt_Constraint Power 0.011
TopOpt_Constraint Volume 1
#TopOpt_Constraint Stress 20E6
TopOpt_Constraint Stress_Pnorm 10E6

## Output Options
## output <data> <path/outputname>
##output T dataT.vtk