7 module subroutine csub_cg_calc_stress(this, nodes, hnew)
9 class(GwfCsubType) :: this
10 integer(I4B),
intent(in) :: nodes
11 real(DP),
dimension(nodes),
intent(in) :: hnew
17 integer(I4B) :: idx_conn
31 if (this%iupdatestress /= 0)
then
32 do node = 1, this%dis%nodes
37 top = this%dis%top(node)
38 bot = this%dis%bot(node)
42 if (this%ibound(node) /= 0)
then
49 hbar = squadratic0sp(hcell, bot, this%satomega)
53 gs = (top - hbar) * this%sgm(node) + (hbar - bot) * this%sgs(node)
55 gs = thick * this%sgs(node)
63 do nn = 1, this%nbound
64 node = this%nodelistsig0(nn)
66 this%cg_gs(node) = this%cg_gs(node) + sadd
70 do node = 1, this%dis%nodes
77 do ii = this%dis%con%ia(node) + 1, this%dis%con%ia(node + 1) - 1
80 m = this%dis%con%ja(ii)
81 idx_conn = this%dis%con%jas(ii)
84 if (this%dis%con%ihc(idx_conn) == 0)
then
90 if (this%dis%ndim /= 1)
then
91 gs = gs + this%cg_gs(m)
95 va_scale = this%dis%get_area_factor(node, idx_conn)
96 gs_conn = this%cg_gs(m)
97 gs = gs + (gs_conn * va_scale)
105 this%cg_gs(node) = gs
111 do node = 1, this%dis%nodes
112 top = this%dis%top(node)
113 bot = this%dis%bot(node)
114 if (this%ibound(node) /= 0)
then
121 hbar = squadratic0sp(hcell, bot, this%satomega)
127 es = this%cg_gs(node) - phead
128 this%cg_es(node) = es
130 end subroutine csub_cg_calc_stress
133 module subroutine csub_set_initial_state(this, nodes, hnew)
135 class(GwfCsubType) :: this
136 integer(I4B),
intent(in) :: nodes
137 real(DP),
dimension(nodes),
intent(in) :: hnew
139 character(len=LINELENGTH) :: title
140 character(len=LINELENGTH) :: tag
141 character(len=20) :: cellid
145 integer(I4B) :: idelay
146 integer(I4B) :: ntabrows
147 integer(I4B) :: ntabcols
153 real(DP) :: void_ratio
163 call this%csub_cg_calc_stress(nodes, hnew)
168 this%cg_es0(node) = this%cg_es(node)
172 do ib = 1, this%ninterbeds
173 idelay = this%idelay(ib)
174 node = this%nodelist(ib)
175 top = this%dis%top(node)
176 bot = this%dis%bot(node)
180 if (this%ispecified_pcs == 0)
then
182 if (this%ipch /= 0)
then
183 pcs = this%cg_es(node) - pcs0
185 pcs = this%cg_es(node) + pcs0
189 if (this%ipch /= 0)
then
190 pcs = this%cg_gs(node) - (pcs0 - bot)
192 if (pcs < this%cg_es(node))
then
193 pcs = this%cg_es(node)
199 if (idelay /= 0)
then
200 dzhalf = dhalf * this%dbdzini(1, idelay)
205 do n = 1, this%ndelaycells
206 if (this%ispecified_dbh == 0)
then
207 this%dbh(n, idelay) = hcell + this%dbh(n, idelay)
209 this%dbh(n, idelay) = hcell
211 this%dbh0(n, idelay) = this%dbh(n, idelay)
215 call this%csub_delay_calc_stress(ib, hcell)
219 do n = 1, this%ndelaycells
220 zbot = this%dbz(n, idelay) - dzhalf
223 dbpcs = pcs - (zbot - bot) * (this%sgs(node) - done)
224 this%dbpcs(n, idelay) = dbpcs
227 this%dbes0(n, idelay) = this%dbes(n, idelay)
234 top = this%dis%top(node)
235 bot = this%dis%bot(node)
238 if (this%istoragec == 1)
then
241 if (this%lhead_based .EQV. .true.)
then
247 void_ratio = porosity_to_void_ratio(this%cg_theta(node))
248 es = this%cg_es(node)
252 hbar = squadratic0sp(hcell, bot, this%satomega)
255 znode = this%csub_calc_znode(top, bot, hbar)
256 fact = adjust_eff_stress(es, bot, znode, this%sgs(node))
257 fact = fact * (done + void_ratio)
264 this%cg_ske_cr(node) = this%cg_ske_cr(node) * fact
267 if (fact <= dzero)
then
268 call this%dis%noder_to_string(node, cellid)
269 write (errmsg,
'(a,1x,a,a)') &
270 'Negative recompression index calculated for cell', &
271 trim(adjustl(cellid)),
'.'
272 call store_error(errmsg)
277 do ib = 1, this%ninterbeds
278 idelay = this%idelay(ib)
279 node = this%nodelist(ib)
280 top = this%dis%top(node)
281 bot = this%dis%bot(node)
284 if (this%istoragec == 1)
then
287 if (this%lhead_based .EQV. .true.)
then
293 void_ratio = porosity_to_void_ratio(this%theta(ib))
294 es = this%cg_es(node)
298 hbar = squadratic0sp(hcell, bot, this%satomega)
301 znode = this%csub_calc_znode(top, bot, hbar)
302 fact = adjust_eff_stress(es, bot, znode, this%sgs(node))
303 fact = fact * (done + void_ratio)
310 this%ci(ib) = this%ci(ib) * fact
311 this%rci(ib) = this%rci(ib) * fact
314 if (fact <= dzero)
then
315 call this%dis%noder_to_string(node, cellid)
316 write (errmsg,
'(a,1x,i0,2(1x,a),a)') &
317 'Negative compression indices calculated for interbed', ib, &
318 'in cell', trim(adjustl(cellid)),
'.'
319 call store_error(errmsg)
324 if (this%iprpak == 1)
then
326 title = trim(adjustl(this%packName))// &
327 ' PACKAGE CALCULATED INITIAL INTERBED STRESSES AT THE CELL BOTTOM'
330 ntabrows = this%ninterbeds
332 if (this%inamedbound /= 0)
then
333 ntabcols = ntabcols + 1
337 call table_cr(this%inputtab, this%packName, title)
338 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
341 tag =
'INTERBED NUMBER'
342 call this%inputtab%initialize_column(tag, 10, alignment=tableft)
344 call this%inputtab%initialize_column(tag, 20)
345 tag =
'GEOSTATIC STRESS'
346 call this%inputtab%initialize_column(tag, 16)
347 tag =
'EFFECTIVE STRESS'
348 call this%inputtab%initialize_column(tag, 16)
349 tag =
'PRECONSOLIDATION STRESS'
350 call this%inputtab%initialize_column(tag, 16)
351 if (this%inamedbound /= 0)
then
353 call this%inputtab%initialize_column(tag, lenboundname, &
358 do ib = 1, this%ninterbeds
359 node = this%nodelist(ib)
360 call this%dis%noder_to_string(node, cellid)
363 call this%inputtab%add_term(ib)
364 call this%inputtab%add_term(cellid)
365 call this%inputtab%add_term(this%cg_gs(node))
366 call this%inputtab%add_term(this%cg_es(node))
367 call this%inputtab%add_term(this%pcs(ib))
368 if (this%inamedbound /= 0)
then
369 call this%inputtab%add_term(this%boundname(ib))
376 title = trim(adjustl(this%packName))// &
377 ' PACKAGE CALCULATED INITIAL DELAY INTERBED STRESSES'
381 do ib = 1, this%ninterbeds
382 idelay = this%idelay(ib)
383 if (idelay /= 0)
then
384 ntabrows = ntabrows + this%ndelaycells
388 if (this%inamedbound /= 0)
then
389 ntabcols = ntabcols + 1
393 call table_cr(this%inputtab, this%packName, title)
394 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
397 tag =
'INTERBED NUMBER'
398 call this%inputtab%initialize_column(tag, 10, alignment=tableft)
400 call this%inputtab%initialize_column(tag, 20)
402 call this%inputtab%initialize_column(tag, 10, alignment=tableft)
403 tag =
'GEOSTATIC STRESS'
404 call this%inputtab%initialize_column(tag, 16)
405 tag =
'EFFECTIVE STRESS'
406 call this%inputtab%initialize_column(tag, 16)
407 tag =
'PRECONSOLIDATION STRESS'
408 call this%inputtab%initialize_column(tag, 16)
409 if (this%inamedbound /= 0)
then
411 call this%inputtab%initialize_column(tag, lenboundname, &
416 do ib = 1, this%ninterbeds
417 idelay = this%idelay(ib)
418 if (idelay /= 0)
then
419 node = this%nodelist(ib)
420 call this%dis%noder_to_string(node, cellid)
423 do n = 1, this%ndelaycells
425 call this%inputtab%add_term(ib)
426 call this%inputtab%add_term(cellid)
428 call this%inputtab%add_term(
' ')
429 call this%inputtab%add_term(
' ')
431 call this%inputtab%add_term(n)
432 call this%inputtab%add_term(this%dbgeo(n, idelay))
433 call this%inputtab%add_term(this%dbes(n, idelay))
434 call this%inputtab%add_term(this%dbpcs(n, idelay))
435 if (this%inamedbound /= 0)
then
437 call this%inputtab%add_term(this%boundname(ib))
439 call this%inputtab%add_term(
' ')
447 if (this%istoragec == 1)
then
448 if (this%lhead_based .EQV. .false.)
then
450 title = trim(adjustl(this%packName))// &
451 ' PACKAGE COMPRESSION INDICES'
454 ntabrows = this%ninterbeds
456 if (this%inamedbound /= 0)
then
457 ntabcols = ntabcols + 1
461 call table_cr(this%inputtab, this%packName, title)
462 call this%inputtab%table_df(ntabrows, ntabcols, this%iout)
465 tag =
'INTERBED NUMBER'
466 call this%inputtab%initialize_column(tag, 10, alignment=tableft)
468 call this%inputtab%initialize_column(tag, 20)
470 call this%inputtab%initialize_column(tag, 16)
472 call this%inputtab%initialize_column(tag, 16)
473 if (this%inamedbound /= 0)
then
475 call this%inputtab%initialize_column(tag, lenboundname, &
480 do ib = 1, this%ninterbeds
481 fact = done / dlog10es
482 node = this%nodelist(ib)
483 call this%dis%noder_to_string(node, cellid)
486 call this%inputtab%add_term(ib)
487 call this%inputtab%add_term(cellid)
488 call this%inputtab%add_term(this%ci(ib) * fact)
489 call this%inputtab%add_term(this%rci(ib) * fact)
490 if (this%inamedbound /= 0)
then
491 call this%inputtab%add_term(this%boundname(ib))
499 if (count_errors() > 0)
then
500 call store_error_filename(this%input_fname)
507 if (this%lhead_based .EQV. .true.)
then
508 this%iupdatestress = 0
510 end subroutine csub_set_initial_state
512end submodule gwfcsubmodulestress
This module contains the CSUB package methods.