Commit 26f7fb45 authored by Ron Rahaman's avatar Ron Rahaman

Added 2D transient circle problem

parent 00f08f6b
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
# This is a circle from x=(-0.5, 0.5) and y=(-0.5,0.5)
file = 2D_circle_sideset.exo
block_id = '1'
block_name = 'interior'
boundary_id = '100'
boundary_name = 'wall'
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatSource]
type = HeatSource
function = '100*cos(3.14159*x)*cos(3.14159*y)'
variable = T
[../]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./wall]
type = DirichletBC
variable = T
boundary = 'wall'
value = 0
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
block = 'interior'
[../]
[./cp]
type = GenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
block = 'interior'
[../]
[./rho]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
block = 'interior'
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(3.14159*x/80)*exp(-0.95/(0.092*8.92)*3.14159^2/80^2*t)' #T(x,t) = 100sin(pix/L)exp(-rho/(cp k) pi^2/L^2 t)
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2 # Others available: backward Euler, Crank-Nicholson, etc.
dt = 0.5 # Initial timestep size
start_time = 0 # Starting time
num_steps = 6 # DIVERGES AFTER 6 TIMESTEPS...
nl_rel_tol = 1e-12 # Nonlinear relative tolerance
l_tol = 1e-6 # Linear tolerance
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_perf_log = true
[]
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