diff --git a/BayesValidRox/tests/PA-A/model_exe.py b/BayesValidRox/tests/PA-A/model_exe.py index d694fb8cc3beecc0d88c7e40c6fc85db82eeb601..11a5707c15600c85469a0288e470d63af99f7881 100755 --- a/BayesValidRox/tests/PA-A/model_exe.py +++ b/BayesValidRox/tests/PA-A/model_exe.py @@ -46,8 +46,8 @@ elif model == 'stokespnm': pvdfile2 = 'regular_2D_stokespnm_250_micron_pnm' darcyfile = 'regular_2D_stokespnm_250_micron_pnm-00000.vtp' stokesfile = 'regular_2D_stokespnm_250_micron_stokes-00000.vtu' - velocity_points = "../models/velocity_points_pnm.csv" - pressure_points = "../models/pressure_points_pnm.csv" + velocity_points = "../models/velocity_points.csv" + pressure_points = "../models/pressure_points.csv" else: @@ -67,7 +67,7 @@ if Process1 != 0: print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process1) # Extract velocity and pressure values with pvpython -if model == 'stokespnm': +if model == 'stokespnm' and not averaging: Command = "pvpython ../extractpointdataovertime.py \ -f "+pvdfile1+".pvd "+pvdfile2+".pvd\ -p " @@ -97,21 +97,6 @@ if averaging: print('\nMessage 4:') print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process4) -# Combine csv files and remove them -#if model == 'stokespnm': - #pointVel = np.genfromtxt('ffpm_{}_velocity.csv'.format(model), delimiter=',') - #pointP = np.genfromtxt('ffpm_{}_p.csv'.format(model), delimiter=',') - #if averaging: - #averagedVel = np.genfromtxt('averagedVelocityValues.csv', delimiter=',') - #averagedP = np.genfromtxt('averagedPressureValues.csv', delimiter=',') - #pointVel[:len(averagedVel)] = averagedVel - #pointP[:len(averagedP)] = averagedP - - ## Save to csv files - #np.savetxt('ffpm_{}_velocity_final.csv'.format(model), pointVel, delimiter=',') - #np.savetxt('ffpm_{}_p_final.csv'.format(model), pointP, delimiter=',') - - # Zip auxillary files keys = ['vtu', 'vtp', 'pvd', '.csv', '.out'] filePaths = [path for path in os.listdir('.') for key in keys if key in path] diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/averaging_stokespnm.py b/BayesValidRox/tests/PA-A/models/stokespnm/averaging_stokespnm.py index a9a5566fc7052dee632994406b0f282e4b18ddea..03d2dcbc4caccdade3d02e157e7f3b6401274ed7 100755 --- a/BayesValidRox/tests/PA-A/models/stokespnm/averaging_stokespnm.py +++ b/BayesValidRox/tests/PA-A/models/stokespnm/averaging_stokespnm.py @@ -56,7 +56,7 @@ cellVolumeDarcy = refThroatLength * refThroatLength # and a uniform grain distri meshStokes= meshio.read(vtuFilenameStokes) pointsStokes = meshStokes.points -pointsStokes[:,1] -= 0.5*refThroatLength +#pointsStokes[:,1] -= 0.5*refThroatLength cellsStokes = meshStokes.cells[0][1] pStokes = meshStokes.cell_data["p"][0] velocityStokes = meshStokes.cell_data["velocity_liq (m/s)"][0] diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_p_final.csv b/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_p_final.csv index fa9228111ab8dae8236056f3dfb0236dbb4d9027..a0eede5b635147e05401c3188045219bc316a942 100644 --- a/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_p_final.csv +++ b/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_p_final.csv @@ -1,5 +1,5 @@ 1.541271785178439935e-01 1.398353454344730129e-01 -1.356391268334570244e-01 -3.686870100594618477e-02 -1.882245291245203400e-01 +1.356284437987030356e-01 +4.121724126514183378e-02 +1.876528242680516601e-01 diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_velocity_final.csv b/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_velocity_final.csv index 99fb70ad7feb2ca4cb59d7c6a67322df826a6ec6..015ece591b4243a434a478c52e8f2721d169752a 100644 --- a/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_velocity_final.csv +++ b/BayesValidRox/tests/PA-A/models/stokespnm/ffpm_stokespnm_velocity_final.csv @@ -1,20 +1,20 @@ -3.213385491170990462e-05,2.221720833444055076e-05,0.000000000000000000e+00 +3.213385491170987751e-05,2.221720833444044911e-05,0.000000000000000000e+00 1.554155385361256214e-05,-2.087274897181839894e-05,0.000000000000000000e+00 -3.387460252584917488e-05,-1.435866121691564958e-05,0.000000000000000000e+00 +3.387460252584921554e-05,-1.435866121691544968e-05,0.000000000000000000e+00 4.062721657604453571e-05,2.741326525791480177e-06,0.000000000000000000e+00 5.172412232277403594e-05,2.915390739815610185e-06,0.000000000000000000e+00 -4.497145477170826099e-05,3.097899437464475249e-05,0.000000000000000000e+00 +4.497145477170822711e-05,3.097899437464484736e-05,0.000000000000000000e+00 1.383479555122326151e-05,-3.120058414972574874e-05,0.000000000000000000e+00 -4.306955321570762267e-05,-2.335681713636809939e-05,0.000000000000000000e+00 -9.647291679540552644e-06,-3.805205573452738645e-05,0.000000000000000000e+00 -1.520029585743679795e-04,-3.141330491663663679e-05,0.000000000000000000e+00 -1.644379480832648612e-04,2.294106305715139419e-06,0.000000000000000000e+00 -1.663057693202743428e-04,2.913221855114677598e-05,0.000000000000000000e+00 -1.152429148641458985e-04,-1.770997270587081941e-04,0.000000000000000000e+00 -2.200741624903915922e-03,-1.700597507307743321e-04,0.000000000000000000e+00 -2.371717440493879402e-03,2.492813682297530442e-06,0.000000000000000000e+00 -2.421187357337812544e-03,3.004108329150056417e-05,0.000000000000000000e+00 -2.010030664398375615e-03,-4.473437698377053591e-04,0.000000000000000000e+00 -2.144530726705174729e-03,5.968039606085586714e-07,0.000000000000000000e+00 -2.187861383539521035e-03,6.309791842796716624e-06,0.000000000000000000e+00 -8.425551459032725767e-05,-4.489396839822003922e-04,0.000000000000000000e+00 +4.306955321570757523e-05,-2.335681713636824847e-05,0.000000000000000000e+00 +9.647291679540439142e-06,-4.717613814694102711e-05,0.000000000000000000e+00 +1.520029585743679253e-04,-3.887096643526869122e-05,0.000000000000000000e+00 +1.644379480832649425e-04,2.869653917874515188e-06,0.000000000000000000e+00 +1.663057693202743700e-04,3.644893764295680850e-05,0.000000000000000000e+00 +8.371527353038637738e-05,-1.193184281086814922e-04,0.000000000000000000e+00 +1.668988089289867105e-03,-1.095962246859215328e-04,0.000000000000000000e+00 +1.794972265670973866e-03,3.390082643177042365e-06,0.000000000000000000e+00 +1.832787613953966227e-03,4.218863400174237141e-05,0.000000000000000000e+00 +2.368655034942970285e-03,-3.592094095670582020e-04,0.000000000000000000e+00 +2.544286296387662880e-03,1.121624667131777147e-06,0.000000000000000000e+00 +2.596210012835909690e-03,1.223823181169443856e-05,0.000000000000000000e+00 +1.159602609078430136e-04,-3.622298317708362797e-04,0.000000000000000000e+00 diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/model_stokespnm_exe.py b/BayesValidRox/tests/PA-A/models/stokespnm/model_stokespnm_exe.py index bd82c681c3ce5fb123b78557211f7af65087af13..c938b4de1873a7223165dd8acf2f045f3430c1e6 100755 --- a/BayesValidRox/tests/PA-A/models/stokespnm/model_stokespnm_exe.py +++ b/BayesValidRox/tests/PA-A/models/stokespnm/model_stokespnm_exe.py @@ -33,8 +33,8 @@ pvdfile1 = 'regular_2D_stokespnm_250_micron_stokes' pvdfile2 = 'regular_2D_stokespnm_250_micron_pnm' darcyfile = 'regular_2D_stokespnm_250_micron_pnm-00000.vtp' stokesfile = 'regular_2D_stokespnm_250_micron_stokes-00000.vtu' -velocity_points = "../velocity_points_pnm.csv" -pressure_points = "../pressure_points_pnm.csv" +velocity_points = "../velocity_points.csv" +pressure_points = "../pressure_points.csv" NewCommand = model_exe + ' ' + inputFile @@ -44,21 +44,6 @@ if Process1 != 0: print('\nMessage 1:') print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process1) -# Extract velocity and pressure values with pvpython -Command = "pvpython ../../extractpointdataovertime.py \ - -f "+pvdfile1+".pvd "+pvdfile2+".pvd\ - -p " - -Process2 = os.system(Command + velocity_points) -if Process2 != 0: - print('\nMessage 2:') - print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process2) - -Process3 = os.system(Command + pressure_points + ' -var p') -if Process3 != 0: - print('\nMessage 3:') - print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process3) - # Averaging if averaging: Command_avg = "./averaging_stokespnm.py -of ffpm_{}_velocity_final \ @@ -68,19 +53,21 @@ if averaging: if Process4 != 0: print('\nMessage 4:') print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process4) - -# Combine csv files and remove them -#pointVel = np.genfromtxt('ffpm_{}_velocity.csv'.format(model), delimiter=',') -#pointP = np.genfromtxt('ffpm_{}_p.csv'.format(model), delimiter=',') -#if averaging: - #averagedVel = np.genfromtxt('averagedVelocityValues.csv', delimiter=',') - #averagedP = np.genfromtxt('averagedPressureValues.csv', delimiter=',') - #pointVel[:len(averagedVel)] = averagedVel - #pointP[:len(averagedP)] = averagedP - -## Save to csv files -#np.savetxt('ffpm_{}_velocity_final.csv'.format(model), pointVel, delimiter=',') -#np.savetxt('ffpm_{}_p_final.csv'.format(model), pointP, delimiter=',') +else: + # Extract velocity and pressure values with pvpython + Command = "pvpython ../../extractpointdataovertime.py \ + -f "+pvdfile1+".pvd "+pvdfile2+".pvd\ + -p " + + Process2 = os.system(Command + velocity_points) + if Process2 != 0: + print('\nMessage 2:') + print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process2) + + Process3 = os.system(Command + pressure_points + ' -var p') + if Process3 != 0: + print('\nMessage 3:') + print('\tIf value of \'%d\' is a non-zero value, then compilation problems \n' % Process3) # Zip auxillary files keys = ['vtu', 'vtp', 'pvd', '.csv', '.out'] diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.input b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.input index 140997f4dce34a15f3c4a839abd8013286b9c2bf..c85581dcd43fa0e0d1f6327170df8cb1e88786d4 100644 --- a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.input +++ b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.input @@ -1,14 +1,16 @@ [Stokes.Grid] -LowerLeft = -0.000125000 0.005125 # inlet length: 0.25e-2 m -UpperRight = 0.010125 0.006125 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m +LowerLeft = -0.000125000 0.005 # inlet length: 0.25e-2 m +UpperRight = 0.010125 0.006 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m CellsPerThroat = 16 #32 Cells1 = 64 #128 FixedCellsBetweenThroats = 16 #32 Refinement = 0 [PNM.Grid] +Positions0 = 0 0.0005 0.001 0.0015 0.002 0.0025 0.003 0.0035 0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008 0.0085 0.009 0.0095 0.01 +Positions1 = 0.000125 0.000625 0.001125 0.001625 0.002125 0.002625 0.003125 0.003625 0.004125 0.004625 0.005 LowerLeft = 0 125e-6 -UpperRight = 0.010 0.005125 # 20 x 10 block, block size 250e-6 m +UpperRight = 0.010 0.005 # 20 x 10 block, block size 250e-6 m NumPores = 21 11 PoreInscribedRadius = 125e-6 ThroatInscribedRadius = 125e-6 @@ -32,8 +34,8 @@ TransmissibilityHalfPore = 1.7642875191945115e-05 Name = stokes EnableInertiaTerms = false VInflowMax = 1e-3 -InletLeft = -125e-6 0.5625e-2 -InletRight = -125e-6 0.6125e-2 +InletLeft = -125e-6 0.55e-2 +InletRight = -125e-6 0.6e-2 OutflowLength = 0.5e-3 Beta = 35237.668793254459160 # 35238.834999009282910 with symm. grad. diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.tpl.input b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.tpl.input index 7684d87ea2b88bd917e5e2790d6b1dcd9471fff7..d8977e8dc23a138d8b19072d8354bdf4570e9380 100644 --- a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.tpl.input +++ b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_leftInflow.tpl.input @@ -1,14 +1,16 @@ [Stokes.Grid] -LowerLeft = -0.000125000 0.005125 # inlet length: 0.25e-2 m -UpperRight = 0.010125 0.006125 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m +LowerLeft = -0.000125000 0.005 # inlet length: 0.25e-2 m +UpperRight = 0.010125 0.006 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m CellsPerThroat = 16 #32 Cells1 = 64 #128 FixedCellsBetweenThroats = 16 #32 Refinement = 0 [PNM.Grid] +Positions0 = 0 0.0005 0.001 0.0015 0.002 0.0025 0.003 0.0035 0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008 0.0085 0.009 0.0095 0.01 +Positions1 = 0.000125 0.000625 0.001125 0.001625 0.002125 0.002625 0.003125 0.003625 0.004125 0.004625 0.005 LowerLeft = 0 125e-6 -UpperRight = 0.010 0.005125 # 20 x 10 block, block size 250e-6 m +UpperRight = 0.010 0.005 # 20 x 10 block, block size 250e-6 m NumPores = 21 11 PoreInscribedRadius = 125e-6 ThroatInscribedRadius = 125e-6 @@ -32,8 +34,8 @@ TransmissibilityHalfPore = <X3> #1.7642875191945115e-05 Name = stokes EnableInertiaTerms = false VInflowMax = <X1> #1e-3 -InletLeft = -125e-6 0.5625e-2 -InletRight = -125e-6 0.6125e-2 +InletLeft = -125e-6 0.55e-2 +InletRight = -125e-6 0.6e-2 OutflowLength = 0.5e-3 Beta = <X4> #35237.668793254459160 # 35238.834999009282910 with symm. grad. diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.input b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.input index 02573dc565f98eb93cd0f9854ba712751525e9d7..b97ed9edf80a2c464b0ae5aeef6a128a83e6465a 100644 --- a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.input +++ b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.input @@ -1,14 +1,16 @@ [Stokes.Grid] -LowerLeft = -0.000125000 0.005125 # inlet length: 0.25e-2 m -UpperRight = 0.010125 0.006125 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m +LowerLeft = -0.000125000 0.005 # inlet length: 0.25e-2 m +UpperRight = 0.010125 0.006 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m CellsPerThroat = 16 #32 Cells1 = 64 #128 FixedCellsBetweenThroats = 16 #32 Refinement = 0 [PNM.Grid] +Positions0 = 0 0.0005 0.001 0.0015 0.002 0.0025 0.003 0.0035 0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008 0.0085 0.009 0.0095 0.01 +Positions1 = 0.000125 0.000625 0.001125 0.001625 0.002125 0.002625 0.003125 0.003625 0.004125 0.004625 0.005 LowerLeft = 0 125e-6 -UpperRight = 0.010 0.005125 # 20 x 10 block, block size 250e-6 m +UpperRight = 0.010 0.005# 20 x 10 block, block size 250e-6 m NumPores = 21 11 PoreInscribedRadius = 125e-6 ThroatInscribedRadius = 125e-6 @@ -32,8 +34,8 @@ TransmissibilityHalfPore = 1.7642875191945115e-05 Name = stokes EnableInertiaTerms = false VInflowMax = -1e-3 -InletLeft = 0.0015 0.6125e-2 -InletRight = 0.0045 0.6125e-2 +InletLeft = 0.0015 0.6e-2 +InletRight = 0.0045 0.6e-2 OutflowLength = 0.5e-3 Beta = 35237.668793254459160 # 35238.834999009282910 with symm. grad. diff --git a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.tpl.input b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.tpl.input index bc817f387d428fb17169d81f911bc436bc0fcba7..17147b22914120263ccd9d5d65330a19f5b09753 100644 --- a/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.tpl.input +++ b/BayesValidRox/tests/PA-A/models/stokespnm/params_squared_inclusion_topInflow.tpl.input @@ -1,14 +1,16 @@ [Stokes.Grid] -LowerLeft = -0.000125000 0.005125 # inlet length: 0.25e-2 m -UpperRight = 0.010125 0.006125 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m +LowerLeft = -0.000125000 0.005 # inlet length: 0.25e-2 m +UpperRight = 0.010125 0.006 # outlet length: 0.25e-2 m, heigth channel: 1e-3 m CellsPerThroat = 16 #32 Cells1 = 64 #128 FixedCellsBetweenThroats = 16 #32 Refinement = 0 [PNM.Grid] +Positions0 = 0 0.0005 0.001 0.0015 0.002 0.0025 0.003 0.0035 0.004 0.0045 0.005 0.0055 0.006 0.0065 0.007 0.0075 0.008 0.0085 0.009 0.0095 0.01 +Positions1 = 0.000125 0.000625 0.001125 0.001625 0.002125 0.002625 0.003125 0.003625 0.004125 0.004625 0.005 LowerLeft = 0 125e-6 -UpperRight = 0.010 0.005125 # 20 x 10 block, block size 250e-6 m +UpperRight = 0.010 0.005 # 20 x 10 block, block size 250e-6 m NumPores = 21 11 PoreInscribedRadius = 125e-6 ThroatInscribedRadius = 125e-6 @@ -32,8 +34,8 @@ TransmissibilityHalfPore = <X3> #1.7642875191945115e-05 Name = stokes EnableInertiaTerms = false VInflowMax = -<X1> #1e-3 -InletLeft = 0.0015 0.6125e-2 -InletRight = 0.0045 0.6125e-2 +InletLeft = 0.0015 0.6e-2 +InletRight = 0.0045 0.6e-2 OutflowLength = 0.5e-3 Beta = <X4> #35237.668793254459160 # 35238.834999009282910 with symm. grad.