-
Notifications
You must be signed in to change notification settings - Fork 0
/
App1_simple_diffusion.i
90 lines (79 loc) · 1.2 KB
/
App1_simple_diffusion.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 100
ymax = 100
[]
[Variables]
[./T] #temperature field
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./S]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./Center_circle]
type = SmoothCircleIC
variable = T
x1 = 50
y1 = 50
radius = 5
int_width = 1
invalue = 10
outvalue = 0
[../]
[]
[BCs]
#Specifying nothing: no-flux BC
[./zero_bc]
type = DirichletBC
variable = T
value = 0
boundary = 'top right'
[../]
[]
[Kernels]
[./Time_derivative_T]
type = TimeDerivative
variable = T
[../]
[./divergence_term]
type = Diffusion
variable = T
[../]
[./Source_term]
type = CoupledForce
variable = T
v = S
[../]
[]
[Preconditioning]
[./Getting_off_diagonal_Jacobian]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
l_max_its = 30
l_tol = 1e-4
nl_max_its = 50
nl_rel_tol = 1e-8
[./TimeStepper]
type = IterationAdaptiveDT
dt=1
[../]
[]
[Outputs]
exodus = true
[]