Skip to content

Commit

Permalink
hit formatting of materials input files
Browse files Browse the repository at this point in the history
  • Loading branch information
Armando Pabon committed Jul 9, 2024
1 parent 77649ad commit 3b127aa
Show file tree
Hide file tree
Showing 13 changed files with 318 additions and 328 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,50 @@
[]

[Variables]
[./graphite_potential]
[../]
[graphite_potential]
[]
[]

[AuxVariables]
[./temperature]
[temperature]
initial_condition = 713.0
[../]
[]
[]

[Kernels]
[./electric_graphite]
[electric_graphite]
type = ADMatDiffusion
variable = graphite_potential
diffusivity = electrical_conductivity
[../]
[]
[]

[BCs]
[./elec_top]
[elec_top]
type = ADDirichletBC
variable = graphite_potential
boundary = top
value = 10
[../]
[./elec_bottom]
[]
[elec_bottom]
type = ADDirichletBC
variable = graphite_potential
boundary = bottom
value = 0
[../]
[]
[]

[Materials]
[./graphite_electrical]
[graphite_electrical]
type = ADGraphiteElectricalConductivity
temperature = temperature
[../]
[./graphite_electrical_resistivity]
[]
[graphite_electrical_resistivity]
type = ADParsedMaterial
property_name = electrical_resistivity
material_property_names = electrical_conductivity
expression = '1 / electrical_conductivity'
[../]
[]
[]

[Executioner]
Expand All @@ -77,19 +77,18 @@
[]

[Postprocessors]
[./max_temperature]
[max_temperature]
type = NodalExtremeValue
variable = temperature
value_type = max
[../]
[./max_electrical_resistivity]
[]
[max_electrical_resistivity]
type = ADElementExtremeMaterialProperty
mat_prop = electrical_resistivity
value_type = max
[../]
[]
[]


[Outputs]
csv = true
perf_graph = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,55 +22,55 @@
[]

[Variables]
[./graphite_potential]
[../]
[graphite_potential]
[]
[]

[AuxVariables]
[./temperature]
[temperature]
initial_condition = 713.0
[../]
[]
[]

[Kernels]
[./electric_graphite]
[electric_graphite]
type = ADMatDiffusion
variable = graphite_potential
diffusivity = ad_electrical_conductivity
[../]
[]
[]

[BCs]
[./elec_top]
[elec_top]
type = DirichletBC
variable = graphite_potential
boundary = top
value = 10
[../]
[./elec_bottom]
[]
[elec_bottom]
type = DirichletBC
variable = graphite_potential
boundary = bottom
value = 0
[../]
[]
[]

[Materials]
[./graphite_electrical]
[graphite_electrical]
type = GraphiteElectricalConductivity
temperature = temperature
[../]
[./converter]
[]
[converter]
type = MaterialADConverter
reg_props_in = electrical_conductivity
ad_props_out = ad_electrical_conductivity
[../]
[./graphite_electrical_resistivity]
[]
[graphite_electrical_resistivity]
type = ParsedMaterial
property_name = electrical_resistivity
material_property_names = electrical_conductivity
expression = '1 / electrical_conductivity'
[../]
[]
[]

[Executioner]
Expand All @@ -82,19 +82,18 @@
[]

[Postprocessors]
[./max_temperature]
[max_temperature]
type = NodalExtremeValue
variable = temperature
value_type = max
[../]
[./max_electrical_resistivity]
[]
[max_electrical_resistivity]
type = ElementExtremeMaterialProperty
mat_prop = electrical_resistivity
value_type = max
[../]
[]
[]


[Outputs]
csv = true
perf_graph = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,91 +11,91 @@
[]

[Mesh]
[./mesh]
[mesh]
type = PatchMeshGenerator
dim = 2
[../]
[]
coord_type = RZ
[]

[AuxVariables]
[./temperature]
[temperature]
initial_condition = 300.0
[../]
[]
[]

[AuxKernels]
[./temp_aux]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_ramp
[../]
[]
[]

[Functions]
[./temp_ramp]
[temp_ramp]
type = ParsedFunction
expression = '300 + 400.0/60.*t' #stand-in for a 400C/min heating rate
[../]
[./thermal_expansion]
[]
[thermal_expansion]
type = ParsedFunction
symbol_names = T
symbol_values = temperature
expression = '(1.996e-6*log(T*4.799e-2)-4.041e-6)'
[../]
[./thexp_exact]
[]
[thexp_exact]
type = ParsedFunction
symbol_names = 'ref_temperature thermal_expansion temperature'
symbol_values = '300.0 thermal_expansion temperature'
expression = 'thermal_expansion * (temperature - ref_temperature)'
[../]
[]
[]

[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
[all]
strain = SMALL
decomposition_method = EigenSolution
add_variables = true
use_automatic_differentiation = true
eigenstrain_names = graphite_thermal_expansion
generate_output = 'strain_xx'
[../]
[../]
[../]
[]
[]
[]
[]

[BCs]
[./left]
[left]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = left
[../]
[./bottom]
[]
[bottom]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = bottom
[../]
[]
[]

[Materials]
[./elasticity_tensor]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./graphite_thermal_expansion]
[]
[graphite_thermal_expansion]
type = ADGraphiteThermalExpansionEigenstrain
eigenstrain_name = graphite_thermal_expansion
stress_free_temperature = 300
temperature = temperature
[../]
[./stress]
[]
[stress]
type = ADComputeLinearElasticStress
[../]
[]
[]

[Executioner]
Expand All @@ -114,32 +114,31 @@
[]

[Postprocessors]
[./temperature]
[temperature]
type = ElementAverageValue
variable = temperature
[../]
[./strain_xx]
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./thexp_exact]
[]
[thexp_exact]
type = FunctionValuePostprocessor
function = thexp_exact
[../]
[./thexp_diff]
[]
[thexp_diff]
type = DifferencePostprocessor
value1 = strain_xx
value2 = thexp_exact
outputs = none
[../]
[./thexp_max_diff]
[]
[thexp_max_diff]
type = TimeExtremeValue
postprocessor = thexp_diff
value_type = abs_max
[../]
[]
[]


[Outputs]
csv = true
perf_graph = true
Expand Down
Loading

0 comments on commit 3b127aa

Please sign in to comment.