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

Removed steady state check in _run_transient of TransientReactiveTransport #1851

Merged
merged 3 commits into from
Feb 17, 2021

Conversation

mkaguer
Copy link
Contributor

@mkaguer mkaguer commented Feb 16, 2021

Fixes #1796

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #1851 (92c24b8) into dev (e1d10b6) will decrease coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##             dev   #1851     +/-   ##
=======================================
- Coverage   87.1%   87.1%   -0.1%     
=======================================
  Files        147     147             
  Lines      12644   12635      -9     
=======================================
- Hits       11020   11011      -9     
  Misses      1624    1624             

@mkaguer
Copy link
Contributor Author

mkaguer commented Feb 16, 2021

@ma-sadeghi could you check my changes?

Here is some code below I was using to test out my changes. For some reason, the logger.info command wasn't printing anything in the command window. I merged dev and still didn't work. Does this happen to you?

import openpnm as op

# network, geometry, phase
net = op.network.Cubic(shape = [10, 10, 10], spacing=1e-4)
geo = op.geometry.StickAndBall(network=net, pores=net.Ps, throats=net.Ts)
phase = op.phases.Air(network=net)

# physics
phys = op.physics.Standard(network=net, phase=phase, geometry=geo)


# add a source term
phase['pore.concentration'] = 0
phys['pore.A1'] = -1e-11
phys['pore.A2'] = 1
phys['pore.A3'] = 0
phys.add_model(propname='pore.rxn',
               model=op.models.physics.generic_source_term.power_law,
               X='pore.concentration',
               A1='pore.A1',
               A2='pore.A2',
               A3='pore.A3')

# algorithm
tfd = op.algorithms.TransientFickianDiffusion(network=net, phase=phase)

tfd.set_source(propname='pore.rxn', pores=[25, 50, 75])
tfd.set_IC(values=0)
tfd.set_value_BC(pores=net.pores(labels='front'), values=100)

tfd.settings['t_intial'] = 0
tfd.settings['t_final'] = 10
tfd.settings['t_step'] = 0.1
tfd.settings['t_output'] = 1

tfd.run()

@ma-sadeghi
Copy link
Member

@mkaguer Good job. Looks good to me. Regarding the logger message, it might be due to the logger level. Try:

import openpnm as op
ws = op.Workspace()
ws.settings["loglevel"] = 20

See here for more info on log level.

@ma-sadeghi ma-sadeghi merged commit ae032a1 into dev Feb 17, 2021
@ma-sadeghi ma-sadeghi deleted the 1796_tfinal_tinitial_bug branch February 17, 2021 14:06
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

Successfully merging this pull request may close these issues.

ReactiveTransientTransport breaks when t_final == t_initial
2 participants