| 1 | c-----------------------------------------------------------------------
|
|---|
| 2 | c nek5000 user-file template
|
|---|
| 3 | c
|
|---|
| 4 | c user specified routines:
|
|---|
| 5 | c - uservp : variable properties
|
|---|
| 6 | c - userf : local acceleration term for fluid
|
|---|
| 7 | c - userq : local source term for scalars
|
|---|
| 8 | c - userbc : boundary conditions
|
|---|
| 9 | c - useric : initial conditions
|
|---|
| 10 | c - userchk : general purpose routine for checking errors etc.
|
|---|
| 11 | c - userqtl : thermal divergence for lowMach number flows
|
|---|
| 12 | c - usrdat : modify element vertices
|
|---|
| 13 | c - usrdat2 : modify mesh coordinates
|
|---|
| 14 | c - usrdat3 : general purpose routine for initialization
|
|---|
| 15 | c
|
|---|
| 16 | c-----------------------------------------------------------------------
|
|---|
| 17 | subroutine uservp(ix,iy,iz,eg) ! set variable properties
|
|---|
| 18 |
|
|---|
| 19 | c implicit none
|
|---|
| 20 |
|
|---|
| 21 | integer ix,iy,iz,eg
|
|---|
| 22 |
|
|---|
| 23 | include 'SIZE'
|
|---|
| 24 | include 'TOTAL'
|
|---|
| 25 | include 'NEKUSE'
|
|---|
| 26 |
|
|---|
| 27 | integer e
|
|---|
| 28 | c e = gllel(eg)
|
|---|
| 29 |
|
|---|
| 30 | udiff = 0.0
|
|---|
| 31 | utrans = 0.0
|
|---|
| 32 |
|
|---|
| 33 | return
|
|---|
| 34 | end
|
|---|
| 35 | c-----------------------------------------------------------------------
|
|---|
| 36 | subroutine userf(ix,iy,iz,eg) ! set acceleration term
|
|---|
| 37 | c
|
|---|
| 38 | c Note: this is an acceleration term, NOT a force!
|
|---|
| 39 | c Thus, ffx will subsequently be multiplied by rho(x,t).
|
|---|
| 40 | c
|
|---|
| 41 | c implicit none
|
|---|
| 42 |
|
|---|
| 43 | integer ix,iy,iz,eg
|
|---|
| 44 |
|
|---|
| 45 | include 'SIZE'
|
|---|
| 46 | include 'TOTAL'
|
|---|
| 47 | include 'NEKUSE'
|
|---|
| 48 |
|
|---|
| 49 | integer e
|
|---|
| 50 | c e = gllel(eg)
|
|---|
| 51 |
|
|---|
| 52 | ffx = 0.0
|
|---|
| 53 | ffy = 0.0
|
|---|
| 54 | ffz = 0.0
|
|---|
| 55 |
|
|---|
| 56 | return
|
|---|
| 57 | end
|
|---|
| 58 | c-----------------------------------------------------------------------
|
|---|
| 59 | subroutine userq(ix,iy,iz,eg) ! set source term
|
|---|
| 60 |
|
|---|
| 61 | c implicit none
|
|---|
| 62 |
|
|---|
| 63 | integer ix,iy,iz,eg
|
|---|
| 64 |
|
|---|
| 65 | include 'SIZE'
|
|---|
| 66 | include 'TOTAL'
|
|---|
| 67 | include 'NEKUSE'
|
|---|
| 68 |
|
|---|
| 69 | integer e
|
|---|
| 70 | c e = gllel(eg)
|
|---|
| 71 |
|
|---|
| 72 | qvol = 0.0
|
|---|
| 73 |
|
|---|
| 74 | return
|
|---|
| 75 | end
|
|---|
| 76 | c-----------------------------------------------------------------------
|
|---|
| 77 | subroutine userbc(ix,iy,iz,iside,eg) ! set up boundary conditions
|
|---|
| 78 | c
|
|---|
| 79 | c NOTE ::: This subroutine MAY NOT be called by every process
|
|---|
| 80 | c
|
|---|
| 81 | c implicit none
|
|---|
| 82 |
|
|---|
| 83 | integer ix,iy,iz,iside,eg
|
|---|
| 84 |
|
|---|
| 85 | include 'SIZE'
|
|---|
| 86 | include 'TOTAL'
|
|---|
| 87 | include 'NEKUSE'
|
|---|
| 88 |
|
|---|
| 89 | c if (cbc(iside,gllel(eg),ifield).eq.'v01')
|
|---|
| 90 |
|
|---|
| 91 | ux = 0.0
|
|---|
| 92 | uy = 0.0
|
|---|
| 93 | uz = 0.0
|
|---|
| 94 | temp = 0.0
|
|---|
| 95 |
|
|---|
| 96 | return
|
|---|
| 97 | end
|
|---|
| 98 | c-----------------------------------------------------------------------
|
|---|
| 99 | subroutine useric(ix,iy,iz,eg) ! set up initial conditions
|
|---|
| 100 |
|
|---|
| 101 | c implicit none
|
|---|
| 102 |
|
|---|
| 103 | integer ix,iy,iz,eg
|
|---|
| 104 |
|
|---|
| 105 | include 'SIZE'
|
|---|
| 106 | include 'TOTAL'
|
|---|
| 107 | include 'NEKUSE'
|
|---|
| 108 |
|
|---|
| 109 | ux = 0.0
|
|---|
| 110 | uy = 0.0
|
|---|
| 111 | uz = 0.0
|
|---|
| 112 | temp = 0.0
|
|---|
| 113 |
|
|---|
| 114 | return
|
|---|
| 115 | end
|
|---|
| 116 | c-----------------------------------------------------------------------
|
|---|
| 117 | subroutine userchk()
|
|---|
| 118 |
|
|---|
| 119 | c implicit none
|
|---|
| 120 |
|
|---|
| 121 | include 'SIZE'
|
|---|
| 122 | include 'TOTAL'
|
|---|
| 123 |
|
|---|
| 124 | return
|
|---|
| 125 | end
|
|---|
| 126 | c-----------------------------------------------------------------------
|
|---|
| 127 | subroutine userqtl ! Set thermal divergence
|
|---|
| 128 |
|
|---|
| 129 | call userqtl_scig
|
|---|
| 130 |
|
|---|
| 131 | return
|
|---|
| 132 | end
|
|---|
| 133 | c-----------------------------------------------------------------------
|
|---|
| 134 | subroutine usrdat() ! This routine to modify element vertices
|
|---|
| 135 |
|
|---|
| 136 | c implicit none
|
|---|
| 137 |
|
|---|
| 138 | include 'SIZE'
|
|---|
| 139 | include 'TOTAL'
|
|---|
| 140 |
|
|---|
| 141 | return
|
|---|
| 142 | end
|
|---|
| 143 | c-----------------------------------------------------------------------
|
|---|
| 144 | subroutine usrdat2() ! This routine to modify mesh coordinates
|
|---|
| 145 |
|
|---|
| 146 | c implicit none
|
|---|
| 147 |
|
|---|
| 148 | include 'SIZE'
|
|---|
| 149 | include 'TOTAL'
|
|---|
| 150 |
|
|---|
| 151 | return
|
|---|
| 152 | end
|
|---|
| 153 | c-----------------------------------------------------------------------
|
|---|
| 154 | subroutine usrdat3()
|
|---|
| 155 |
|
|---|
| 156 | c implicit none
|
|---|
| 157 |
|
|---|
| 158 | include 'SIZE'
|
|---|
| 159 | include 'TOTAL'
|
|---|
| 160 |
|
|---|
| 161 | return
|
|---|
| 162 | end
|
|---|