Skip to content

Commit 6999ac1

Browse files
committed
small updates
1 parent ea16db9 commit 6999ac1

File tree

12 files changed

+59
-34
lines changed

12 files changed

+59
-34
lines changed

docs/documentation/authors.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ We try to maintain a list of current and past developers:
1717
+ M. Rodriguez
1818
+ K. Schmidmayer
1919
+ J. Spratt
20+
+ B. Wilfong

docs/documentation/case.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,14 @@ end if
205205

206206
#### Hard Coded Patches
207207

208-
Some patch configurations are not adequatley handeled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifers to `src/pre_process/include/1[2,3]dHardcodedIC.fpp`. For example, to add a 2D Hardcoded patch with an id of 201, one would add the following to `src/pre_process/include/2dHardcodedIC.fpp`
208+
Some patch configurations are not adequatley handeled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifers to `src/pre_process/include/1[2,3]dHardcodedIC.fpp`. For example, to add a 2D Hardcoded patch with an id of 200, one would add the following to `src/pre_process/include/2dHardcodedIC.fpp`
209209

210210
```f90
211-
if (patch_icpp%hcid == 201) then
211+
case(200)
212212
! Primitive variables assignment
213-
end if
214213
```
215214

216-
and use `patch_icpp(i)%geometry = y` and `patch_icpp(i)%hcid = 201` in the input file. As a convention, any hard coded patches that are part of the MFC master branch should be identied as 1[2,3]xx where the first digit indiates the number of dimensions.
215+
and use `patch_icpp(i)%geometry = 7` and `patch_icpp(i)%hcid = 200` in the input file. Additional variables can be declared in `Hardcoded1[2,3]DVariables` and used in `hardcoded1[2,3]D`. As a convention, any hard coded patches that are part of the MFC master branch should be identied as 1[2,3]xx where the first digit indiates the number of dimensions.
217216

218217
#### Parameter Descriptions
219218

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# 2D Hardcodied IC Example
2+
3+
## Initial Condition
4+
5+
![Initial Condition](initial.png)
6+
7+
## Result
8+
9+
![Result](result.png)

examples/2D_hardcodied_ic/case.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
'm' : 199,
2727
'n' : 199,
2828
'p' : 0,
29-
'dt' : 5.E-07,
29+
'dt' : 5.E-06,
3030
't_step_start' : 0,
31-
't_step_stop' : 100000,
32-
't_step_save' : 1000,
31+
't_step_stop' : 2000,
32+
't_step_save' : 200,
3333
# ==========================================================
3434

3535
# Simulation Algorithm Parameters ==========================
@@ -50,9 +50,9 @@
5050
'wave_speeds' : 1,
5151
'avg_state' : 2,
5252
'bc_x%beg' : -2,
53-
'bc_x%end' : -2,
54-
'bc_y%beg' : -6,
55-
'bc_y%end' : -6,
53+
'bc_x%end' : -7,
54+
'bc_y%beg' : -2,
55+
'bc_y%end' : -7,
5656
# ==========================================================
5757

5858
# Formatted Database Files Structure Parameters ============
@@ -71,7 +71,7 @@
7171
'patch_icpp(1)%length_y' : 8.,
7272
'patch_icpp(1)%vel(1)' : 0.,
7373
'patch_icpp(1)%vel(2)' : 0.,
74-
'patch_icpp(1)%pres' : 100,
74+
'patch_icpp(1)%pres' : 10,
7575
'patch_icpp(1)%alpha_rho(1)' : (1-eps)*1000,
7676
'patch_icpp(1)%alpha_rho(2)' : eps*1,
7777
'patch_icpp(1)%alpha(1)' : 1-eps,
17.4 KB
Loading
59.9 KB
Loading

src/post_process/m_start_up.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ subroutine s_check_input_file() ! --------------------------------------
127127

128128
end subroutine s_check_input_file ! ------------------------------------
129129

130-
subroutine s_perform_time_step(t_step)
130+
subroutine s_perform_time_step(t_step)
131131

132132
integer, intent(INOUT) :: t_step
133133
if (proc_rank == 0) then

src/pre_process/include/1dHardcodedIC.fpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66

77
#:def Hardcoded1D()
88

9-
if (patch_icpp(patch_id)%hcid == 100) then
10-
11-
end if
9+
select case(patch_icpp(patch_id)%hcid)
10+
case(100)
11+
! Put your variable assignments here
12+
case default
13+
call s_int_to_str(patch_id, iStr)
14+
call s_mpi_abort("Invalid hcid specified for patch " // trim(iStr))
15+
end select
1216

1317
#:enddef

src/pre_process/include/2dHardcodedIC.fpp

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@
77
#:enddef
88

99
#:def Hardcoded2D()
10-
11-
if (patch_icpp(patch_id)%hcid == 200) then ! 2D_hardcoded_ic example case
12-
13-
if (y_cc(j) <= (-x_cc(i)**3 + 1)**(1d0/3d0)) then
14-
! Volume Fractions
15-
q_prim_vf(advxb)%sf(i, j, 0) = eps
16-
q_prim_vf(advxe)%sf(i, j, 0) = 1d0-eps
17-
! Denssities
18-
q_prim_vf(contxb)%sf(i, j, 0) = eps*1000d0
19-
q_prim_vf(contxe)%sf(i, j, 0) = (1d0-eps)*1d0
20-
! Pressure
21-
q_prim_vf(E_idx)%sf(i, j, 0) = 1d0
22-
end if
23-
24-
end if
10+
11+
select case(patch_icpp(patch_id)%hcid) ! 2D_hardcoded_ic example case
12+
case(200)
13+
if (y_cc(j) <= (-x_cc(i)**3 + 1)**(1d0/3d0)) then
14+
! Volume Fractions
15+
q_prim_vf(advxb)%sf(i, j, 0) = eps
16+
q_prim_vf(advxe)%sf(i, j, 0) = 1d0-eps
17+
! Denssities
18+
q_prim_vf(contxb)%sf(i, j, 0) = eps*1000d0
19+
q_prim_vf(contxe)%sf(i, j, 0) = (1d0-eps)*1d0
20+
! Pressure
21+
q_prim_vf(E_idx)%sf(i, j, 0) = 1000d0
22+
end if
23+
case default
24+
if (proc_rank == 0) then
25+
call s_int_to_str(patch_id, iStr)
26+
call s_mpi_abort("Invalid hcid specified for patch " // trim(iStr))
27+
end if
28+
end select
2529

2630
#:enddef

src/pre_process/include/3dHardcodedIC.fpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66

77
#:def Hardcoded3D()
88

9-
if (patch_icpp(patch_id)%hcid == 300) then
10-
11-
end if
9+
select case(patch_icpp(patch_id)%hcid)
10+
case(300)
11+
! Put your variable assignments here
12+
case default
13+
call s_int_to_str(patch_id, iStr)
14+
call s_mpi_abort("Invalid hcid specified for patch " // trim(iStr))
15+
end select
1216

1317
#:enddef

0 commit comments

Comments
 (0)