@@ -11,7 +11,7 @@ def test_eval_f(nx, nz, direction, spectral_space):
1111 import numpy as np
1212 from pySDC .implementations .problem_classes .RayleighBenard3D import RayleighBenard3D
1313
14- P = RayleighBenard3D (nx = nx , ny = nx , nz = nz , Rayleigh = 1 , spectral_space = spectral_space )
14+ P = RayleighBenard3D (nx = nx , ny = nx , nz = nz , Rayleigh = 1 , spectral_space = spectral_space , Lx = 1 , Ly = 1 , Lz = 1 )
1515 iu , iv , iw , ip , iT = P .index (['u' , 'v' , 'w' , 'p' , 'T' ])
1616 X , Y , Z = P .X , P .Y , P .Z
1717 cos , sin = np .cos , np .sin
@@ -297,7 +297,7 @@ def test_heterogeneous_implementation(N=8, useGPU=True):
297297def test_Nusselt_number_computation (w , N = 4 ):
298298 from pySDC .implementations .problem_classes .RayleighBenard3D import RayleighBenard3D
299299
300- prob = RayleighBenard3D (nx = N , ny = N , nz = N , dealiasing = 1.0 , spectral_space = False , Rayleigh = 1.0 )
300+ prob = RayleighBenard3D (nx = N , ny = N , nz = N , dealiasing = 1.0 , spectral_space = False , Rayleigh = 1.0 , Prandtl = 1.0 )
301301 xp = prob .xp
302302 iw , iT = prob .index (['w' , 'T' ])
303303
@@ -341,36 +341,6 @@ def test_Nusselt_number_computation(w, N=4):
341341 assert xp .isclose (Nu [key ], w ), f'Expected Nu_{ key } ={ w } , but got { Nu [key ]} with constant T and perturbed w!'
342342
343343
344- @pytest .mark .mpi4py
345- @pytest .mark .mpi (ranks = [1 , 4 ])
346- def test_Reynolds_number_computation (mpi_ranks ):
347- from pySDC .implementations .problem_classes .RayleighBenard3D import RayleighBenard3D
348-
349- N = 4
350- prob = RayleighBenard3D (nx = N , ny = N , nz = N , dealiasing = 1.0 , spectral_space = False , Rayleigh = 1.0 )
351- xp = prob .xp
352- iu , iv , iw = prob .index (['u' , 'v' , 'w' ])
353-
354- u = prob .u_exact ()
355- u [iu ] = 1
356- u [iv ] = 1
357- u [iw ] = 1
358- Re = prob .get_Reynolds_number (u )
359- assert xp .isclose (Re , xp .sqrt (3 ))
360-
361- u = prob .u_exact ()
362- u [iv ] = (2 * prob .Z ) ** (1 / 2 )
363- Re = prob .get_Reynolds_number (u )
364- assert xp .isclose (Re , 1 )
365-
366- u = prob .u_exact ()
367- u [iv ] = (2 * prob .Z ) ** (1 / 2 )
368- u [iu ] = (2 * prob .Z ) ** (1 / 2 )
369- u [iw ] = (2 * prob .Z ) ** (1 / 2 )
370- Re = prob .get_Reynolds_number (u )
371- assert xp .isclose (Re , xp .sqrt (3 ))
372-
373-
374344@pytest .mark .mpi4py
375345def test_CFL ():
376346 from pySDC .implementations .problem_classes .RayleighBenard3D import RayleighBenard3D
@@ -452,7 +422,7 @@ def test_spectrum_computation(mpi_ranks):
452422
453423
454424if __name__ == '__main__' :
455- # test_eval_f(2**2, 2**1, 'x', False)
425+ test_eval_f (2 ** 2 , 2 ** 1 , 'x' , False )
456426 # test_libraries()
457427 # test_Poisson_problems(4, 'u')
458428 # test_Poisson_problem_w()
@@ -461,5 +431,4 @@ def test_spectrum_computation(mpi_ranks):
461431 # test_heterogeneous_implementation()
462432 # test_Nusselt_number_computation(N=4, w=3.14)
463433 test_spectrum_computation (None )
464- # test_Reynolds_number_computation(None)
465434 # test_CFL()
0 commit comments