forked from idaholab/moose
/
bh04.i
209 lines (192 loc) · 3.7 KB
/
bh04.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[../]
[]
[Variables]
[./pp]
initial_condition = 0
[../]
[]
[Kernels]
[./mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[../]
[]
[UserObjects]
[./dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[../]
[./borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[../]
[./pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[../]
[]
[Modules]
[./FluidProperties]
[./simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[../]
[../]
[]
[Materials]
[./temperature]
type = PorousFlowTemperature
at_nodes = true
[../]
[./ppss_nodal]
type = PorousFlow1PhaseP
at_nodes = true
porepressure = pp
capillary_pressure = pc
[../]
[./ppss_qp]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[../]
[./massfrac]
type = PorousFlowMassFraction
at_nodes = true
[../]
[./simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
at_nodes = true
[../]
[./dens_all]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_fluid_phase_density_nodal
include_old = true
[../]
[./visc_all]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_viscosity_nodal
[../]
[./porosity]
type = PorousFlowPorosityConst
at_nodes = true
porosity = 0.1
[../]
[./permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[../]
[./relperm]
type = PorousFlowRelativePermeabilityFLAC
at_nodes = true
m = 2
phase = 0
[../]
[./relperm_all]
type = PorousFlowJoiner
at_nodes = true
material_property = PorousFlow_relative_permeability_nodal
[../]
[]
[DiracKernels]
[./bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = -1E6
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[../]
[./p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./mass_bal_fcn]
type = ParsedFunction
value = abs((a-c+d)/2/(a+c))
vars = 'a c d'
vals = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 1E3
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh04
exodus = false
csv = true
execute_on = timestep_end
[]