Closed rikvg closed 5 years ago
It might take a while to work out an answer to your question. We're busy this week getting ready for a conference :-)
Dear Prof. Gostick,
Thank you for the quick response. I will try to work on a solution myself in the meantime, and I am interested in your response when you have the time.
Good luck with your preparations for the conference!
Dear Prof. Gostick, @magnaou and team,
I have worked further on the topic and decided to first focus on getting the model working for a well-defined cubic network :). I would like to use the ChargeConservationNernstPlanck algorithm to simulate steady-state reactive transport together with ion transport for the vII/vIII redox couple, but I still have some questions about its implementation that I was hoping you might be willing to answer.
The set-up of my code is as following:
vanadiumII['pore.potential_field'] = eta - potential_solid - equilibrium_potential
After this I would like to use the coupled solver as given in the ChargeConservationNernstPlanck algorithm in order to solve the steady state charge transfer and ion transfer.
However, when I call the algorithm, I get the following error:
cc_vII = op.algorithms.ChargeConservationNernstPlanck(network=net, phase=vanadiumII)
cc_vII.settings['ions'] = vanadiumII
cc_vII.settings['potential_field'] = vanadiumII['pore.potential_field']
cc_vII.run()
File "C:\Users\...\Anaconda3\lib\site-packages\openpnm\algorithms\ChargeConservationNernstPlanck.py", line 53, in run
p_alg[p_alg.settings['quantity']]
AttributeError: 'numpy.ndarray' object has no attribute 'settings'
How would I go about correctly calling this algorithm? Furthermore, the algorithm calls _run_reactive for both the potential field and the concentration of the ions. What equations are exactly solved for both cases? Where would I be able to alter these equations so that I can play with the transport and reactive terms that are taken into account?
Thank you in advance!
Kind regards, Rik
Dear all,
I am currently learning to use OpenPNM for my research on flow batteries and would like to setup a model similar to the one described in:
For this, I am trying to run advection-diffusion simulations as well as reactive transport simulations. However, I run into an issue when running the code that I do not know how to solve.
First of all, when I try to add the ad_dif_conductance model to a network that has two distinct geometries, the model gives the following error while computing:
ValueError: operands could not be broadcast together with shapes (1300,) (300,)
The total amount of throats in my system is 1300, however. the geometry that belongs to the physics model that I would like to add the model to only has 300 throats. I believe that I should specify that only the pressure in the pores of geometry type 1 should be used for the calculation of Qij. How would I be able to resolve this error?
Secondly, a question that I have for future implementation: if I want to run a reactive transport simulation, of which I do not know the conversion, should I use the set_rate_BC as output boundary condition by simply setting it to 0 (i.e. is this the same as dC/dx =0)?
Hereby, both scripts (both for the network generation and for the advection-diffusion simulation test (error occurs in the second script in line:
phys_big.add_model(propname='throat.ad_dif_conductance', model=mod, s_scheme='powerlaw')
).Network structure code
Network Simulation code:
Thank you, Rik