SFEMaNS  version 5.3
Reference documentation for SFEMaNS
condlim_test_36.f90
Go to the documentation of this file.
2  USE def_type_mesh
3  USE input_data
4  USE my_util
5 !!$ATTENTION
6 !!$Some subroutines have been commented to avoid warning messages when compiling executable.
7 !!$It can not be done in the module boundary_generic that expects all subroutines to be present.
8 !!$END ATTENTION
9  PUBLIC :: init_velocity_pressure
10  PUBLIC :: init_temperature
11 !!$ PUBLIC :: init_level_set
12  PUBLIC :: source_in_ns_momentum
13  PUBLIC :: source_in_temperature
14 !!$ PUBLIC :: source_in_level_set
15  PUBLIC :: vv_exact
16 !!$ PUBLIC :: imposed_velocity_by_penalty
17  PUBLIC :: pp_exact
18  PUBLIC :: temperature_exact
19 !!$ PUBLIC :: level_set_exact
20 !!$ PUBLIC :: penal_in_real_space
21  PUBLIC :: extension_velocity
22 !!$ PUBLIC :: Vexact
23 !!$ PUBLIC :: H_B_quasi_static
24 !!$ PUBLIC :: Hexact
25 !!$ PUBLIC :: Phiexact
26 !!$ PUBLIC :: Jexact_gauss
27 !!$ PUBLIC :: Eexact_gauss
28 !!$ PUBLIC :: init_maxwell
29 !!$ PUBLIC :: mu_bar_in_fourier_space
30 !!$ PUBLIC :: grad_mu_bar_in_fourier_space
31 !!$ PUBLIC :: mu_in_real_space
32  PUBLIC :: nu_tilde_law
33  PRIVATE
34 
35 CONTAINS
36  !===============================================================================
37  ! Boundary conditions for Navier-Stokes
38  !===============================================================================
39 
40  !===Initialize velocity, pressure
41  SUBROUTINE init_velocity_pressure(mesh_f, mesh_c, time, dt, list_mode, &
42  un_m1, un, pn_m1, pn, phin_m1, phin)
43  IMPLICIT NONE
44  TYPE(mesh_type) :: mesh_f, mesh_c
45  REAL(KIND=8), INTENT(OUT):: time
46  REAL(KIND=8), INTENT(IN) :: dt
47  INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
48  REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: un_m1, un
49  REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: pn_m1, pn, phin_m1, phin
50  INTEGER :: mode, i, j
51  REAL(KIND=8), DIMENSION(mesh_c%np) :: pn_m2
52 
53  time = 0.d0
54  DO i= 1, SIZE(list_mode)
55  mode = list_mode(i)
56  DO j = 1, 6
57  !===velocity
58  un_m1(:,j,i) = vv_exact(j,mesh_f%rr,mode,time-dt)
59  un(:,j,i) = vv_exact(j,mesh_f%rr,mode,time)
60  END DO
61  DO j = 1, 2
62  !===pressure
63  pn_m2(:) = pp_exact(j,mesh_c%rr,mode,time-2*dt)
64  pn_m1(:,j,i) = pp_exact(j,mesh_c%rr,mode,time-dt)
65  pn(:,j,i) = pp_exact(j,mesh_c%rr,mode,time)
66  phin_m1(:,j,i) = pn_m1(:,j,i) - pn_m2(:)
67  phin(:,j,i) = pn(:,j,i) - pn_m1(:,j,i)
68  ENDDO
69  ENDDO
70  END SUBROUTINE init_velocity_pressure
71 
72  !===Initialize temperature
73  SUBROUTINE init_temperature(mesh, time, dt, list_mode, tempn_m1, tempn)
74  IMPLICIT NONE
75  TYPE(mesh_type) :: mesh
76  REAL(KIND=8), INTENT(OUT):: time
77  REAL(KIND=8), INTENT(IN) :: dt
78  INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
79  REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: tempn_m1, tempn
80  INTEGER :: mode, i, j
81 
82  time = 0.d0
83  DO i= 1, SIZE(list_mode)
84  mode = list_mode(i)
85  DO j = 1, 2
86  tempn_m1(:,j,i) = temperature_exact(j, mesh%rr, mode, time-dt)
87  tempn(:,j,i) = temperature_exact(j, mesh%rr, mode, time)
88  ENDDO
89  ENDDO
90  END SUBROUTINE init_temperature
91 
92 !!$ !===Initialize level_set
93 !!$ SUBROUTINE init_level_set(vv_mesh, time, &
94 !!$ dt, list_mode, level_set_m1, level_set)
95 !!$ IMPLICIT NONE
96 !!$ TYPE(mesh_type) :: vv_mesh
97 !!$ REAL(KIND=8), INTENT(OUT):: time
98 !!$ REAL(KIND=8), INTENT(IN) :: dt
99 !!$ INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
100 !!$ REAL(KIND=8), DIMENSION(:,:,:,:), INTENT(OUT):: level_set, level_set_m1
101 !!$ INTEGER :: mode, i, j, n
102 !!$ time = 0.d0
103 !!$ DO i= 1, SIZE(list_mode)
104 !!$ mode = list_mode(i)
105 !!$ DO j = 1, 2
106 !!$ !===level_set
107 !!$ DO n = 1, inputs%nb_fluid -1
108 !!$ level_set_m1(n,:,j,i) = level_set_exact(n,j,vv_mesh%rr,mode,time-dt)
109 !!$ level_set (n,:,j,i) = level_set_exact(n,j,vv_mesh%rr,mode,time)
110 !!$ END DO
111 !!$ END DO
112 !!$ END DO
113 !!$ END SUBROUTINE init_level_set
114 
115  !===Source in momemtum equation. Always called.
116  FUNCTION source_in_ns_momentum(TYPE, rr, mode, i, time, Re, ty, opt_density, opt_tempn) RESULT(vv)
117  IMPLICIT NONE
118  INTEGER , INTENT(IN) :: TYPE
119  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
120  INTEGER , INTENT(IN) :: mode, i
121  REAL(KIND=8), INTENT(IN) :: time
122  REAL(KIND=8), INTENT(IN) :: Re
123  CHARACTER(LEN=2), INTENT(IN) :: ty
124  REAL(KIND=8), DIMENSION(:,:,:), OPTIONAL, INTENT(IN) :: opt_density
125  REAL(KIND=8), DIMENSION(:,:,:), OPTIONAL, INTENT(IN) :: opt_tempn
126  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv, r, z, nu
127  REAL(KIND=8) :: nu_bar
128  INTEGER :: m
129  REAL(KIND=8) :: d
130  CHARACTER(LEN=2) :: np
131 
132  IF (PRESENT(opt_density)) CALL error_petsc('density should not be present for test 36')
133  IF (PRESENT(opt_tempn)) m=i
134 
135  r = rr(1,:)
136  z = rr(2,:)
137 
138  nu_bar = inputs%Re**(-1)
139  nu = nu_bar - (nu_bar/2) * (r**3 + exp(z)) / (1.d0 + exp(1.d0)) * cos(time)**2
140 
141  ! du/dt
142 
143  IF ((TYPE == 3) .AND. (mode == 0)) THEN
144  vv = r**2 * cos(time - z)
145  ELSE
146  vv = 0.d0
147  END IF
148 
149  ! (curl u) cross u
150 
151  IF ((TYPE == 1) .AND. (mode == 0)) THEN
152  vv = vv - 3 * r**3 * sin(time - z)**2
153  ELSE IF ((TYPE == 5) .AND. (mode == 0)) THEN
154  vv = vv + r**4 * cos(time - z) * sin(time - z)
155  END IF
156 
157  ! - 2 * div (nu * grads u)
158 
159  IF ((TYPE == 3) .AND. (mode == 0)) THEN
160  vv = vv &
161  + (nu_bar/2)/(1.d0 + exp(1.d0)) * r**2*cos(time)**2 * (3*r*sin(time - z) - exp(z)*cos(time - z)) &
162  - nu * (3.d0 - r**2) * sin(time - z)
163  END IF
164 
165  RETURN
166 
167  !===Dummies variables to avoid warning
168  m=i; np=ty; d=re
169  !===Dummies variables to avoid warning
170  END FUNCTION source_in_ns_momentum
171 
172  !===Extra source in temperature equation. Always called.
173  FUNCTION source_in_temperature(TYPE, rr, m, t)RESULT(vv)
174  IMPLICIT NONE
175  INTEGER , INTENT(IN) :: TYPE
176  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
177  INTEGER , INTENT(IN) :: m
178  REAL(KIND=8), INTENT(IN) :: t
179  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv, r, z
180 
181  r = rr(1,:)
182  z = rr(2,:)
183 
184  IF ((TYPE == 1) .AND. (m == 0)) THEN
185  vv = - (r**3 + exp(z)) / (1.d0 + exp(1.d0)) * sin(2 * t) &
186  - inputs%temperature_diffusivity(1) * (9 * r + exp(z)) / (1.d0 + exp(1.d0)) * cos(t)**2
187  ELSE
188  vv = 0.d0
189  END IF
190 
191  RETURN
192  END FUNCTION source_in_temperature
193 
194 !!$ !===Extra source in level set equation. Always called.
195 !!$ FUNCTION source_in_level_set(interface_nb,TYPE, rr, m, t)RESULT(vv)
196 !!$ IMPLICIT NONE
197 !!$ INTEGER , INTENT(IN) :: TYPE
198 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
199 !!$ INTEGER , INTENT(IN) :: m, interface_nb
200 !!$ REAL(KIND=8), INTENT(IN) :: t
201 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
202 !!$
203 !!$ vv=0.d0
204 !!$ RETURN
205 !!$ END FUNCTION source_in_level_set
206 
207  !===Velocity for boundary conditions in Navier-Stokes.
208  !===Can be used also to initialize velocity in: init_velocity_pressure_temperature
209  FUNCTION vv_exact(TYPE,rr,m,t) RESULT(vv)
210  IMPLICIT NONE
211  INTEGER , INTENT(IN) :: TYPE
212  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
213  INTEGER, INTENT(IN) :: m
214  REAL(KIND=8), INTENT(IN) :: t
215  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv, r, z
216 
217  r = rr(1,:)
218  z = rr(2,:)
219 
220  IF ((TYPE == 3) .AND. (m == 0)) THEN
221  vv = r**2 * sin(t - z)
222  ELSE
223  vv = 0.d0
224  END IF
225 
226  RETURN
227  END FUNCTION vv_exact
228 
229 !!$ !===Solid velocity imposed when using penalty technique
230 !!$ !===Defined in Fourier space on mode 0 only.
231 !!$ FUNCTION imposed_velocity_by_penalty(rr,t) RESULT(vv)
232 !!$ IMPLICIT NONE
233 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
234 !!$ REAL(KIND=8), INTENT(IN) :: t
235 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2),6) :: vv
236 !!$
237 !!$ vv=0.d0
238 !!$ RETURN
239 !!$ END FUNCTION imposed_velocity_by_penalty
240 
241  !===Pressure for boundary conditions in Navier-Stokes.
242  !===Can be used also to initialize pressure in the subroutine init_velocity_pressure.
243  !===Use this routine for outflow BCs only.
244  !===CAUTION: Do not enfore BCs on pressure where normal component
245  ! of velocity is prescribed.
246  FUNCTION pp_exact(TYPE,rr,m,t) RESULT (vv)
247  IMPLICIT NONE
248  INTEGER , INTENT(IN) :: TYPE
249  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
250  INTEGER , INTENT(IN) :: m
251  REAL(KIND=8), INTENT(IN) :: t
252  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
253  REAL(KIND=8) :: r
254  INTEGER :: n
255 
256  vv = 0.d0
257  RETURN
258 
259  !===Dummies variables to avoid warning
260  n=type; n=SIZE(rr,1); n=m; r=t
261  !===Dummies variables to avoid warning
262  END FUNCTION pp_exact
263 
264  !===Temperature for boundary conditions in temperature equation.
265  FUNCTION temperature_exact(TYPE,rr,m,t) RESULT (vv)
266  IMPLICIT NONE
267  INTEGER , INTENT(IN) :: TYPE
268  REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
269  INTEGER , INTENT(IN) :: m
270  REAL(KIND=8), INTENT(IN) :: t
271  REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv, r, z
272 
273  r = rr(1,:)
274  z = rr(2,:)
275 
276  IF ((TYPE == 1) .AND. (m == 0)) THEN
277  vv = (r**3 + exp(z)) / (1.d0 + exp(1.d0)) * cos(t)**2
278  ELSE
279  vv = 0.d0
280  END IF
281 
282  RETURN
283  END FUNCTION temperature_exact
284 
285 !!$ !===Can be used to initialize level set in: init_level_set
286 !!$ FUNCTION level_set_exact(interface_nb,TYPE,rr,m,t) RESULT (vv)
287 !!$ IMPLICIT NONE
288 !!$ INTEGER , INTENT(IN) :: TYPE
289 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
290 !!$ INTEGER , INTENT(IN) :: m, interface_nb
291 !!$ REAL(KIND=8), INTENT(IN) :: t
292 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
293 !!$
294 !!$ vv = 0.d0
295 !!$ RETURN
296 !!$ END FUNCTION level_set_exact
297 
298 !!$ !===Penalty coefficient (if needed)
299 !!$ !===This coefficient is equal to zero in subdomain
300 !!$ !===where penalty is applied
301 !!$ FUNCTION penal_in_real_space(mesh,rr_gauss,angles,nb_angles,nb,ne,time) RESULT(vv)
302 !!$ IMPLICIT NONE
303 !!$ TYPE(mesh_type) :: mesh
304 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr_gauss
305 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: angles
306 !!$ INTEGER, INTENT(IN) :: nb_angles
307 !!$ INTEGER, INTENT(IN) :: nb, ne
308 !!$ REAL(KIND=8), INTENT(IN) :: time
309 !!$ REAL(KIND=8), DIMENSION(nb_angles,ne-nb+1) :: vv
310 !!$
311 !!$ vv = 1.d0
312 !!$ RETURN
313 !!$ END FUNCTION penal_in_real_space
314 
315  !===Extension of the velocity field in the solid.
316  !===Used when temperature or Maxwell equations are solved.
317  !===It extends the velocity field on the Navier-Stokes domain to a
318  !===velocity field on the temperature and the Maxwell domain.
319  !===It is also used if problem type=mxw and restart velocity
320  !===is set to true in data (type problem denoted mxx in the code).
321  FUNCTION extension_velocity(TYPE, H_mesh, mode, t, n_start) RESULT(vv)
322  IMPLICIT NONE
323  TYPE(mesh_type), INTENT(IN) :: H_mesh
324  INTEGER , INTENT(IN) :: TYPE, n_start
325  INTEGER, INTENT(IN) :: mode
326  REAL(KIND=8), INTENT(IN) :: t
327  REAL(KIND=8), DIMENSION(H_Mesh%np) :: vv
328  REAL(KIND=8) :: r
329  INTEGER :: n
330 
331  vv = 0.d0
332  RETURN
333 
334  !===Dummies variables to avoid warning
335  n=h_mesh%np; r=t; n=type; n=mode; n=n_start
336  !===Dummies variables to avoid warning
337  END FUNCTION extension_velocity
338 
339  !===============================================================================
340  ! Boundary conditions for Maxwell
341  !===============================================================================
342 !!$ !===Velocity used in the induction equation.
343 !!$ !===Used only if problem type is mxw and restart velocity is false
344 !!$ FUNCTION Vexact(m, H_mesh) RESULT(vv) !Set uniquement a l'induction
345 !!$ IMPLICIT NONE
346 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
347 !!$ INTEGER, INTENT(IN) :: m
348 !!$ REAL(KIND=8), DIMENSION(H_mesh%np,6) :: vv
349 !!$
350 !!$ vv = 0.d0
351 !!$ RETURN
352 !!$ END FUNCTION Vexact
353 
354 !!$ FUNCTION H_B_quasi_static(char_h_b, rr, m) RESULT(vv)
355 !!$ IMPLICIT NONE
356 !!$ CHARACTER(LEN=1), INTENT(IN) :: char_h_b
357 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
358 !!$ INTEGER, INTENT(IN) :: m
359 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2),6) :: vv
360 !!$
361 !!$ IF (inputs%if_quasi_static_approx) THEN
362 !!$ vv = 0.d0
363 !!$ ELSE
364 !!$ CALL error_petsc('H_B_quasi_static should not be called')
365 !!$ END IF
366 !!$ RETURN
367 !!$ END FUNCTION H_B_quasi_static
368 
369 !!$ !===Magnetic field for boundary conditions in the Maxwell equations.
370 !!$ FUNCTION Hexact(H_mesh, TYPE, rr, m, mu_H_field, t) RESULT(vv)
371 !!$ IMPLICIT NONE
372 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
373 !!$ INTEGER , INTENT(IN) :: TYPE
374 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
375 !!$ INTEGER , INTENT(IN) :: m
376 !!$ REAL(KIND=8), INTENT(IN) :: t
377 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: mu_H_field
378 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
379 !!$
380 !!$ vv = 0.d0
381 !!$ RETURN
382 !!$ END FUNCTION Hexact
383 
384 !!$ !===Scalar potential for boundary conditions in the Maxwell equations.
385 !!$ FUNCTION Phiexact(TYPE, rr, m, mu_phi,t) RESULT(vv)
386 !!$ IMPLICIT NONE
387 !!$ INTEGER , INTENT(IN) :: TYPE
388 !!$ REAL(KIND=8), DIMENSION(:,:), INTENT(IN) :: rr
389 !!$ INTEGER , INTENT(IN) :: m
390 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi, t
391 !!$ REAL(KIND=8), DIMENSION(SIZE(rr,2)) :: vv
392 !!$
393 !!$ vv=0.d0
394 !!$ RETURN
395 !!$ END FUNCTION Phiexact
396 
397 !!$ !===Current in Ohm's law. Curl(H) = sigma(E + uxB) + current
398 !!$ FUNCTION Jexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t, mesh_id, opt_B_ext) RESULT(vv)
399 !!$ IMPLICIT NONE
400 !!$ INTEGER , INTENT(IN) :: TYPE
401 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: rr
402 !!$ INTEGER , INTENT(IN) :: m
403 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi, sigma, mu_H, t
404 !!$ INTEGER , INTENT(IN) :: mesh_id
405 !!$ REAL(KIND=8), DIMENSION(6), OPTIONAL,INTENT(IN) :: opt_B_ext
406 !!$ REAL(KIND=8) :: vv
407 !!$
408 !!$ vv = 0.d0
409 !!$ RETURN
410 !!$ END FUNCTION Jexact_gauss
411 
412 !!$ !===Electric field for Neumann BC (cf. doc)
413 !!$ FUNCTION Eexact_gauss(TYPE, rr, m, mu_phi, sigma, mu_H, t) RESULT(vv)
414 !!$ IMPLICIT NONE
415 !!$ INTEGER, INTENT(IN) :: TYPE
416 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: rr
417 !!$ INTEGER, INTENT(IN) :: m
418 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi, sigma, mu_H, t
419 !!$ REAL(KIND=8) :: vv
420 !!$
421 !!$ vv = 0.d0
422 !!$ RETURN
423 !!$ END FUNCTION Eexact_gauss
424 
425 !!$ !===Initialization of magnetic field and scalar potential (if present)
426 !!$ SUBROUTINE init_maxwell(H_mesh, phi_mesh, time, dt, mu_H_field, mu_phi, &
427 !!$ list_mode, Hn1, Hn, phin1, phin)
428 !!$ IMPLICIT NONE
429 !!$ TYPE(mesh_type) :: H_mesh, phi_mesh
430 !!$ REAL(KIND=8), INTENT(OUT):: time
431 !!$ REAL(KIND=8), INTENT(IN) :: dt
432 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: mu_H_field
433 !!$ REAL(KIND=8), INTENT(IN) :: mu_phi
434 !!$ INTEGER, DIMENSION(:), INTENT(IN) :: list_mode
435 !!$ REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: Hn, Hn1
436 !!$ REAL(KIND=8), DIMENSION(:,:,:), INTENT(OUT):: phin, phin1
437 !!$
438 !!$ time = 0.d0
439 !!$ Hn1=0.d0
440 !!$ HN=0.d0
441 !!$ phin = 0.d0
442 !!$ phin1 =0.d0
443 !!$ RETURN
444 !!$ END SUBROUTINE init_maxwell
445 
446 !!$ !===Analytical permeability (if needed)
447 !!$ !===This function is not needed unless the flag
448 !!$ !=== ===Use FEM Interpolation for magnetic permeability (true/false)
449 !!$ !===is activated and set to .FALSE. in the data data file. Default is .TRUE.
450 !!$ FUNCTION mu_bar_in_fourier_space(H_mesh,nb,ne,pts,pts_ids) RESULT(vv)
451 !!$ IMPLICIT NONE
452 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
453 !!$ REAL(KIND=8), DIMENSION(ne-nb+1) :: vv
454 !!$ INTEGER, INTENT(IN) :: nb, ne
455 !!$ REAL(KIND=8),DIMENSION(2,ne-nb+1),OPTIONAL :: pts
456 !!$ INTEGER, DIMENSION(ne-nb+1), OPTIONAL :: pts_ids
457 !!$
458 !!$ vv = 1.d0
459 !!$ RETURN
460 !!$ END FUNCTION mu_bar_in_fourier_space
461 
462 !!$ !===Analytical mu_in_fourier_space (if needed)
463 !!$ !===This function is not needed unless the flag
464 !!$ !=== ===Use FEM Interpolation for magnetic permeability (true/false)
465 !!$ !===is activated and set to .FALSE. in the data data file. Default is .TRUE.
466 !!$ FUNCTION grad_mu_bar_in_fourier_space(pt,pt_id) RESULT(vv)
467 !!$ IMPLICIT NONE
468 !!$ REAL(KIND=8),DIMENSION(2), INTENT(in):: pt
469 !!$ INTEGER,DIMENSION(1), INTENT(in) :: pt_id
470 !!$ REAL(KIND=8),DIMENSION(2) :: vv
471 !!$
472 !!$ vv=0.d0
473 !!$ RETURN
474 !!$ END FUNCTION grad_mu_bar_in_fourier_space
475 
476 !!$ !===Analytical permeability, mu in real space (if needed)
477 !!$ FUNCTION mu_in_real_space(H_mesh,angles,nb_angles,nb,ne,time) RESULT(vv)
478 !!$ IMPLICIT NONE
479 !!$ TYPE(mesh_type), INTENT(IN) :: H_mesh
480 !!$ REAL(KIND=8), DIMENSION(:), INTENT(IN) :: angles
481 !!$ INTEGER, INTENT(IN) :: nb_angles
482 !!$ INTEGER, INTENT(IN) :: nb, ne
483 !!$ REAL(KIND=8), INTENT(IN) :: time
484 !!$ REAL(KIND=8), DIMENSION(nb_angles,ne-nb+1) :: vv
485 !!$
486 !!$ vv = 1.d0
487 !!$ RETURN
488 !!$ END FUNCTION mu_in_real_space
489 
490  !===Kinematic viscosity's law of temperature
491  FUNCTION nu_tilde_law(temp) RESULT(vv)
492  IMPLICIT NONE
493  REAL(KIND=8) :: temp
494  REAL(KIND=8) :: vv
495  REAL(KIND=8) :: nu_bar
496 
497  nu_bar = inputs%Re**(-1)
498 
499  vv = - nu_bar / 2 * temp
500 
501  RETURN
502  END FUNCTION nu_tilde_law
503 
504 END MODULE boundary_test_36
real(kind=8) function, dimension(size(rr, 2)), public source_in_ns_momentum(TYPE, rr, mode, i, time, Re, ty, opt_density, opt_tempn)
real(kind=8) function, dimension(size(rr, 2)), public temperature_exact(TYPE, rr, m, t)
real(kind=8) function, dimension(size(rr, 2)), public source_in_temperature(TYPE, rr, m, t)
subroutine error_petsc(string)
Definition: my_util.f90:16
type(my_data), public inputs
real(kind=8) function, dimension(h_mesh%np), public extension_velocity(TYPE, H_mesh, mode, t, n_start)
real(kind=8) function, public nu_tilde_law(temp)
real(kind=8) function, dimension(size(rr, 2)), public pp_exact(TYPE, rr, m, t)
subroutine, public init_temperature(mesh, time, dt, list_mode, tempn_m1, tempn)
subroutine, public init_velocity_pressure(mesh_f, mesh_c, time, dt, list_mode, un_m1, un, pn_m1, pn, phin_m1, phin)
real(kind=8) function, dimension(size(rr, 2)), public vv_exact(TYPE, rr, m, t)