Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless overshoot/undershoot Capillary number using Fractional Flow Protocol #75

Open
yning2 opened this issue Apr 25, 2023 · 11 comments
Open

Comments

@yning2
Copy link

yning2 commented Apr 25, 2023

Dear LBPM community,

I have a two-phase flow simulation that uses Fractional Flow protocol, trying to compute relative permeability curve for a digital rock. My target capillary number is set as 1e-6. However, my simulation (~400,000,000ts) is still running that has way passed the maximum timesteps specified in the input file (10,000,000 ts) and it doesn't seem to come to an end. After digging into the output file, I've found that the simulation controller keeps missing the target capillary number, though it's been adjusting the body force to hit the target. Below is some of the output, and the measured capillary number is switching between 0.00000 and 0.000002 by adjusting the body force. What is causing this issue? single precision data? Is there a parameter in FlowAdaptor that can help the convergence from the measured capillary number to the target value?


Running Color LBM


voxel length = 1.000000 micron
voxel length = 1.000000 micron
Input media: id_t3400000.raw
Relabeling 3 values
oldvalue=0, newvalue =0
oldvalue=1, newvalue =1
oldvalue=2, newvalue =2
Dimensions of segmented image: 200 x 200 x 200
Reading 8-bit input data
Read segmented data from id_t3400000.raw
Label=0, Count=6200278
Label=1, Count=1136053
Label=2, Count=663669
Distributing subdomains across 1000 processors
Process grid: 10 x 10 x 10
Subdomain size: 20 x 20 x 20
Size of transition region: 0
Media porosity = 0.224965
Initialized solid phase -- Converting to Signed Distance function
Domain set.
Create ScaLBL_Communicator
Set up memory efficient layout, 2425 | 2448 | 10648
Allocating distributions
Setting up device map and neighbor list
Component labels: 1
label=0, affinity=-0.900000, volume fraction==1.032299
Model created
Initializing distributions
Initializing phase field
Affinities - rank 0:
Main: 0
Affinities - rank 0:
Main: 0
** WRITE STEADY POINT *** Ca = 0.000001, (previous = 0.000000)
Measured capillary number 0.000001
-- adjust force by factor 0.809036


CPU time = 0.001228
Lattice update rate (per core)= 1.993114 MLUPS
Lattice update rate (per MPI process)= 1.993114 MLUPS
Update Fractional Flow: change mass of fluid B by 0.016271
Affinities - rank 0:
Main: 0


CPU time = 0.001353
Lattice update rate (per core)= 1.809120 MLUPS
Update Fractional Flow: change mass of fluid B by 0.015959
Affinities - rank 0:
Main: 0


CPU time = 0.001186
Lattice update rate (per core)= 2.063763 MLUPS
Update Fractional Flow: change mass of fluid B by 0.015659
Affinities - rank 0:
Main: 0


CPU time = 0.001187
Lattice update rate (per core)= 2.061687 MLUPS
Update Fractional Flow: change mass of fluid B by 0.015371
Affinities - rank 0:
Main: 0


CPU time = 0.001187
Lattice update rate (per core)= 2.062103 MLUPS
Update Fractional Flow: change mass of fluid B by 0.015094
Affinities - rank 0:
Main: 0


CPU time = 0.001188
Lattice update rate (per core)= 2.060987 MLUPS


Updated fractional flow with saturation change = 0.037060
Used protocol = fractional flow


(flatten density field)
Affinities - rank 0:
Main: 0
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.420585
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.424046
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 4.897506
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.428589
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 5.197465
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.424108
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 4.026854
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.420389
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.719815
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.409140
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.906978
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.417043
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.542121
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.410582
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.994682
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.418009
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.832893
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.418278
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.881904
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.411124
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.920254
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.415480
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.594559
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.410334
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 4.175954
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.421366
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.913667
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.414631
.
.
.
.
.
It is repeating this process and doesn't seem to stop.

@yning2
Copy link
Author

yning2 commented Apr 25, 2023

my input file:

Domain {
Filename = "id_t3400000.raw"
ReadType = "8bit" // data type
nproc = 10, 10, 10 // Number of processors (Npx,Npy,Npz)
n = 20, 20, 20 // Size of local domain (Nx,Ny,Nz)
N = 200, 200, 200 // size of the input image
voxel_length = 1.0
ReadValues = 0, 1, 2 // labels within the original image
WriteValues = 0, 1, 2 // associated labels to be used by LBPM
BC = 0 // fully periodic BC
Sw = 0.1 // target saturation for morphological tools
}

Color {
protocol = "fractional flow"
capillary_number = 1e-6 // capillary number for the displacement, positive="oil injection"
timestepMax = 10000000 // maximum timtestep
alpha = 0.01 // controls interfacial tension
rhoA = 1.0 // controls the density of fluid A
rhoB = 1.0 // controls the density of fluid B
tauA = 0.7 // controls the viscosity of fluid A
tauB = 0.7 // controls the viscosity of fluid B
F = 0, 0, -1e-5 // body force
WettingConvention = "SCAL"
ComponentLabels = 0 // image labels for solid voxels
ComponentAffinity = 0.9 // controls the wetting affinity for each label
Restart = false
}
Analysis {
analysis_interval = 1000 // logging interval for timelog.csv
subphase_analysis_interval = 100000 // loggging interval for subphase.csv
visualization_interval = 200000 // interval to write visualization files
N_threads = 4 // number of analysis threads (GPU version only)
restart_interval = 1000000 // interval to write restart file
restart_file = "Restart" // base name of restart file
load_balance = "independent" // Load balance method to use: "none", "default", "independent"
}
Visualization {
format = "hdf5"
write_silo = false // write SILO databases with assigned variables
save_8bit_raw = true // write labeled 8-bit binary files with phase assignments
save_phase_field = false // save phase field within SILO database
save_pressure = false // save pressure field within SILO database
save_velocity = false // save velocity field within SILO database
}
FlowAdaptor {
min_steady_timesteps = 200000 // minimum number of timesteps per steady point
max_steady_timesteps = 500000 // maximum number of timesteps per steady point
mass_fraction_factor = 0.006 // controls the rate of mass seeding in adaptive step
fractional_flow_increment = 0.03 // saturation change after each steady point
endpoint_threshold = 0.1 // endpoint exit criterion (based on flow rates)
}

@JamesEMcClure
Copy link
Collaborator

I would recommend trying this for a higher capillary number (1e-5) to see if the same behavior is observed. Depending on the resolution of the image, you may not be able to reliably simulate 1e-6 (based on the size of small fluctuations in the velocity that are relate to the solid micro-sturcture).

@yning2
Copy link
Author

yning2 commented Apr 26, 2023

@JamesEMcClure Thanks for your reply! It worked fine for the 1e-5 Nc simulation. Looking at the history of force adjustment, switching between a factor of 3-4 and 0.4, do you think it'd be helpful by refining the force factor adjustment algorithm instead of Ca_target/Ca_measured (just thinking it loud here)? It seems that in low Ca simulations the measured Ca isn't linearly dependent on force. Thank you!

Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.994682
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.418009
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.832893
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.418278
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.881904
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.411124
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.920254
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.415480
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.594559
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.410334
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 4.175954
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.421366
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000)
-- adjust force by factor 3.913667
Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002)
-- adjust force by factor 0.414631

@yning2 yning2 closed this as completed Jun 20, 2023
@renxiaosa00
Copy link

Dear LBPM community,

I have a two-phase flow simulation that uses Fractional Flow protocol, trying to compute relative permeability curve for a digital rock. My target capillary number is set as 1e-6. However, my simulation (~400,000,000ts) is still running that has way passed the maximum timesteps specified in the input file (10,000,000 ts) and it doesn't seem to come to an end. After digging into the output file, I've found that the simulation controller keeps missing the target capillary number, though it's been adjusting the body force to hit the target. Below is some of the output, and the measured capillary number is switching between 0.00000 and 0.000002 by adjusting the body force. What is causing this issue? single precision data? Is there a parameter in FlowAdaptor that can help the convergence from the measured capillary number to the target value?

Running Color LBM

voxel length = 1.000000 micron voxel length = 1.000000 micron Input media: id_t3400000.raw Relabeling 3 values oldvalue=0, newvalue =0 oldvalue=1, newvalue =1 oldvalue=2, newvalue =2 Dimensions of segmented image: 200 x 200 x 200 Reading 8-bit input data Read segmented data from id_t3400000.raw Label=0, Count=6200278 Label=1, Count=1136053 Label=2, Count=663669 Distributing subdomains across 1000 processors Process grid: 10 x 10 x 10 Subdomain size: 20 x 20 x 20 Size of transition region: 0 Media porosity = 0.224965 Initialized solid phase -- Converting to Signed Distance function Domain set. Create ScaLBL_Communicator Set up memory efficient layout, 2425 | 2448 | 10648 Allocating distributions Setting up device map and neighbor list Component labels: 1 label=0, affinity=-0.900000, volume fraction==1.032299 Model created Initializing distributions Initializing phase field Affinities - rank 0: Main: 0 Affinities - rank 0: Main: 0 ** WRITE STEADY POINT *** Ca = 0.000001, (previous = 0.000000) Measured capillary number 0.000001 -- adjust force by factor 0.809036

CPU time = 0.001228 Lattice update rate (per core)= 1.993114 MLUPS Lattice update rate (per MPI process)= 1.993114 MLUPS Update Fractional Flow: change mass of fluid B by 0.016271 Affinities - rank 0: Main: 0

CPU time = 0.001353 Lattice update rate (per core)= 1.809120 MLUPS Update Fractional Flow: change mass of fluid B by 0.015959 Affinities - rank 0: Main: 0

CPU time = 0.001186 Lattice update rate (per core)= 2.063763 MLUPS Update Fractional Flow: change mass of fluid B by 0.015659 Affinities - rank 0: Main: 0

CPU time = 0.001187 Lattice update rate (per core)= 2.061687 MLUPS Update Fractional Flow: change mass of fluid B by 0.015371 Affinities - rank 0: Main: 0

CPU time = 0.001187 Lattice update rate (per core)= 2.062103 MLUPS Update Fractional Flow: change mass of fluid B by 0.015094 Affinities - rank 0: Main: 0

CPU time = 0.001188 Lattice update rate (per core)= 2.060987 MLUPS

Updated fractional flow with saturation change = 0.037060 Used protocol = fractional flow

(flatten density field) Affinities - rank 0: Main: 0 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.420585 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.424046 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.897506 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.428589 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 5.197465 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.424108 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.026854 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.420389 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.719815 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.409140 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.906978 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.417043 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.542121 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.410582 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.994682 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.418009 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.832893 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.418278 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.881904 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.411124 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.920254 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.415480 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.594559 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.410334 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.175954 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.421366 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.913667 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.414631 . . . . . It is repeating this process and doesn't seem to stop.

Which exe the "two-phase flow simulation" is it?

@JamesEMcClure
Copy link
Collaborator

The issue here is likely that the driving force is too small (i.e. target capillary number is too small) compared to the image resolution. If you have a really well-resolved image, you will be able to simulate a lower capillary number compared to a less well-resolved image.

@yning2
Copy link
Author

yning2 commented Sep 25, 2023

Dear LBPM community,
I have a two-phase flow simulation that uses Fractional Flow protocol, trying to compute relative permeability curve for a digital rock. My target capillary number is set as 1e-6. However, my simulation (~400,000,000ts) is still running that has way passed the maximum timesteps specified in the input file (10,000,000 ts) and it doesn't seem to come to an end. After digging into the output file, I've found that the simulation controller keeps missing the target capillary number, though it's been adjusting the body force to hit the target. Below is some of the output, and the measured capillary number is switching between 0.00000 and 0.000002 by adjusting the body force. What is causing this issue? single precision data? Is there a parameter in FlowAdaptor that can help the convergence from the measured capillary number to the target value?
Running Color LBM
voxel length = 1.000000 micron voxel length = 1.000000 micron Input media: id_t3400000.raw Relabeling 3 values oldvalue=0, newvalue =0 oldvalue=1, newvalue =1 oldvalue=2, newvalue =2 Dimensions of segmented image: 200 x 200 x 200 Reading 8-bit input data Read segmented data from id_t3400000.raw Label=0, Count=6200278 Label=1, Count=1136053 Label=2, Count=663669 Distributing subdomains across 1000 processors Process grid: 10 x 10 x 10 Subdomain size: 20 x 20 x 20 Size of transition region: 0 Media porosity = 0.224965 Initialized solid phase -- Converting to Signed Distance function Domain set. Create ScaLBL_Communicator Set up memory efficient layout, 2425 | 2448 | 10648 Allocating distributions Setting up device map and neighbor list Component labels: 1 label=0, affinity=-0.900000, volume fraction==1.032299 Model created Initializing distributions Initializing phase field Affinities - rank 0: Main: 0 Affinities - rank 0: Main: 0 ** WRITE STEADY POINT *** Ca = 0.000001, (previous = 0.000000) Measured capillary number 0.000001 -- adjust force by factor 0.809036
CPU time = 0.001228 Lattice update rate (per core)= 1.993114 MLUPS Lattice update rate (per MPI process)= 1.993114 MLUPS Update Fractional Flow: change mass of fluid B by 0.016271 Affinities - rank 0: Main: 0
CPU time = 0.001353 Lattice update rate (per core)= 1.809120 MLUPS Update Fractional Flow: change mass of fluid B by 0.015959 Affinities - rank 0: Main: 0
CPU time = 0.001186 Lattice update rate (per core)= 2.063763 MLUPS Update Fractional Flow: change mass of fluid B by 0.015659 Affinities - rank 0: Main: 0
CPU time = 0.001187 Lattice update rate (per core)= 2.061687 MLUPS Update Fractional Flow: change mass of fluid B by 0.015371 Affinities - rank 0: Main: 0
CPU time = 0.001187 Lattice update rate (per core)= 2.062103 MLUPS Update Fractional Flow: change mass of fluid B by 0.015094 Affinities - rank 0: Main: 0
CPU time = 0.001188 Lattice update rate (per core)= 2.060987 MLUPS
Updated fractional flow with saturation change = 0.037060 Used protocol = fractional flow
(flatten density field) Affinities - rank 0: Main: 0 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.420585 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.424046 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.897506 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.428589 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 5.197465 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.424108 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.026854 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.420389 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.719815 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.409140 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.906978 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.417043 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.542121 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.410582 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.994682 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.418009 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.832893 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.418278 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.881904 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.411124 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.920254 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.415480 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.594559 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.410334 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.175954 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.421366 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.913667 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.414631 . . . . . It is repeating this process and doesn't seem to stop.

Which exe the "two-phase flow simulation" is it?

lbpm_color_simulator

@yning2
Copy link
Author

yning2 commented Sep 25, 2023

The issue here is likely that the driving force is too small (i.e. target capillary number is too small) compared to the image resolution. If you have a really well-resolved image, you will be able to simulate a lower capillary number compared to a less well-resolved image.

I would think the opposite. With a better-resolved image, the driving force required for the target capillary number would be smaller due to the greater pore-throat size in terms of the number of pixels. As a comparison, an image with the coarser resolution would require a higher driving force to achieve the target capillary number. Thanks for thinking about it, and happy to discuss more on it.

@yning2 yning2 reopened this Sep 25, 2023
@renxiaosa00
Copy link

Dear LBPM community,
I have a two-phase flow simulation that uses Fractional Flow protocol, trying to compute relative permeability curve for a digital rock. My target capillary number is set as 1e-6. However, my simulation (~400,000,000ts) is still running that has way passed the maximum timesteps specified in the input file (10,000,000 ts) and it doesn't seem to come to an end. After digging into the output file, I've found that the simulation controller keeps missing the target capillary number, though it's been adjusting the body force to hit the target. Below is some of the output, and the measured capillary number is switching between 0.00000 and 0.000002 by adjusting the body force. What is causing this issue? single precision data? Is there a parameter in FlowAdaptor that can help the convergence from the measured capillary number to the target value?
Running Color LBM
voxel length = 1.000000 micron voxel length = 1.000000 micron Input media: id_t3400000.raw Relabeling 3 values oldvalue=0, newvalue =0 oldvalue=1, newvalue =1 oldvalue=2, newvalue =2 Dimensions of segmented image: 200 x 200 x 200 Reading 8-bit input data Read segmented data from id_t3400000.raw Label=0, Count=6200278 Label=1, Count=1136053 Label=2, Count=663669 Distributing subdomains across 1000 processors Process grid: 10 x 10 x 10 Subdomain size: 20 x 20 x 20 Size of transition region: 0 Media porosity = 0.224965 Initialized solid phase -- Converting to Signed Distance function Domain set. Create ScaLBL_Communicator Set up memory efficient layout, 2425 | 2448 | 10648 Allocating distributions Setting up device map and neighbor list Component labels: 1 label=0, affinity=-0.900000, volume fraction==1.032299 Model created Initializing distributions Initializing phase field Affinities - rank 0: Main: 0 Affinities - rank 0: Main: 0 ** WRITE STEADY POINT *** Ca = 0.000001, (previous = 0.000000) Measured capillary number 0.000001 -- adjust force by factor 0.809036
CPU time = 0.001228 Lattice update rate (per core)= 1.993114 MLUPS Lattice update rate (per MPI process)= 1.993114 MLUPS Update Fractional Flow: change mass of fluid B by 0.016271 Affinities - rank 0: Main: 0
CPU time = 0.001353 Lattice update rate (per core)= 1.809120 MLUPS Update Fractional Flow: change mass of fluid B by 0.015959 Affinities - rank 0: Main: 0
CPU time = 0.001186 Lattice update rate (per core)= 2.063763 MLUPS Update Fractional Flow: change mass of fluid B by 0.015659 Affinities - rank 0: Main: 0
CPU time = 0.001187 Lattice update rate (per core)= 2.061687 MLUPS Update Fractional Flow: change mass of fluid B by 0.015371 Affinities - rank 0: Main: 0
CPU time = 0.001187 Lattice update rate (per core)= 2.062103 MLUPS Update Fractional Flow: change mass of fluid B by 0.015094 Affinities - rank 0: Main: 0
CPU time = 0.001188 Lattice update rate (per core)= 2.060987 MLUPS
Updated fractional flow with saturation change = 0.037060 Used protocol = fractional flow
(flatten density field) Affinities - rank 0: Main: 0 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.420585 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.424046 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.897506 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.428589 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 5.197465 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.424108 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.026854 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.420389 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.719815 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.409140 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.906978 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.417043 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.542121 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.410582 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.994682 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.418009 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.832893 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.418278 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.881904 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.411124 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.920254 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.415480 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.594559 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.410334 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 4.175954 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.421366 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000000) -- adjust force by factor 3.913667 Capillary number missed target value = 0.000001 (measured value was Ca = 0.000002) -- adjust force by factor 0.414631 . . . . . It is repeating this process and doesn't seem to stop.

Which exe the "two-phase flow simulation" is it?

lbpm_color_simulator

How to sure the parameters of the spectial rock raw CT ?

@yning2
Copy link
Author

yning2 commented Sep 25, 2023

How to sure the parameters of the spectial rock raw CT ?

Sorry I didn't understand your question.

@JamesEMcClure
Copy link
Collaborator

I would think the opposite. With a better-resolved image, the driving force required for the target capillary number would be smaller due to the greater pore-throat size in terms of the number of pixels. As a comparison, an image with the coarser resolution would require a higher driving force to achieve the target capillary number. Thanks for thinking about it, and happy to discuss more on it.

Consider the following as an intuitive argument: A key source of uncertainty in the model is the wall location. The bounceback rule puts the wall location halfway between the fluid and solid node. If you take the ratio of the lattice width to the pore width, it provides you with a way to estimate how large are the errors associated with the boundary representation based on the bounceback rule. In a well-resolved image, you will get quite close to a no-slip condition at the boundary. In a poorly resolved image, you will get "noise" due to the fact that the bounceback rule is being applied in close proximity to the middle of the pores (which is where the dominant flow occurs). This is the effect that you are fighting against.

@renxiaosa00
Copy link

How to sure the parameters of the spectial rock raw CT ?

Sorry I didn't understand your question.

I have a CT image of an actural production,how to set these parameters? What is the theoretical basis?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants