-
Notifications
You must be signed in to change notification settings - Fork 0
/
App2_simple_source.i
95 lines (85 loc) · 1.49 KB
/
App2_simple_source.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
91
92
93
94
95
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 100
ymax = 100
[]
[Variables]
[./S] #Source data
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./Initial_position]
type = ConstantIC
variable = S
value = 0
[../]
[]
[BCs]
[./zero_BC]
type = DirichletBC
variable = S
value = 0
boundary = 'top bottom left right'
[../]
[]
[Kernels]
#[./TimeDerivative]
# type = TimeDerivative
# variable = S
#[../]
#[./diffusion]
# type = Diffusion
# variable = S
#[../]
[./variable_itself]
type = MassEigenKernel
variable = S
eigen = false
[../]
[./traveling_deltafunction]
type = BodyForce
variable = S
value = 10
function = delta_function
[../]
[]
[Functions]
[./delta_function]
type = ParsedFunction
value = 'rot_radi:=30+15*sin(4*w*t);x1:=50+rot_radi*cos(w*t);y1:=50+rot_radi*sin(w*t);r:=(x-x1)^2+(y-y1)^2-size_radi^2;if(r <= 0, -1, 0)'
vars = 'w size_radi'
vals = '0.1 2'
[../]
[]
[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
#l_tol = 0.999999
#nl_max_its = 50
#nl_rel_tol = 0.999999
dt = 0.1
#[./TimeStepper]
# type = IterationAdaptiveDT
# dt=1
#[../]
[]
[Outputs]
exodus = true
[]