-
Notifications
You must be signed in to change notification settings - Fork 38
body force adjustment: scale-then-bisect algorithm #109
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
base: dev
Are you sure you want to change the base?
body force adjustment: scale-then-bisect algorithm #109
Conversation
|
The main comment that I have with this is about how to test this feature (without having much background on how you may have tested it so far): One of the main challenges with the algorithm to adjust the capillary number is that it can take a lot of timesteps for the flow velocity to reach a steady-state based on the driving force. If you adjust the force before the flow velocity has converged then you end up correcting based on a hasty prediction, in which case you will end up adjusting the force more often than necessary, which slows things down. The number of timesteps required to reach steady state will increase with system size. To confirm that this update works as intended I would run steady-state relative permeability simulations (e.g. you can use the random close sphere pack, e.g. |
… use scientific notation cleanup: consolidate color model forward propagation steps cleanup: build warnings unused variables
ecc43fa to
f703e91
Compare
|
@JamesEMcClure I've tested this on the Sph125 as you suggested, but it seems the sphere pack capillary number response is too well-behaved to even trigger the bracketing approach; the capillary number target is reached just fine via the proportional scaling. But on a number of real rocks, you get convergence behavior like this: Once the capillary number is overshot by the proportional scaling, it switches over to bisectional search as you can see in the output. I've also added a switch to the convergence algorithm so that if the capillary number is no longer responding to the body force adjustment, print out a warning like this: and continue. I've seen this pop up in two cases, where the target capillary number is below spurious current floor (which is independent of this PR and you can test this in Sph125 by setting target capillary number to 1e-6), and when the capillary number response is quite noisy so the bracket collapses to a single body force, but still misses the target range. There are likely more corner cases to catch and fix, but this has reduced the number of 'infinitely looping' cases I've seen pop on our cluster. |
Feature
To do