p.m.berger Posted April 23 Share Posted April 23 Hello, This is perhaps slightly evil but I'm curious if it will work. Say I want compile a custom rate law for pyrite and I want to keep track of two different types of pyrite with different surface areas. So I define a rate law with various parameters and the instance of the class is sent to the library. I can't really keep node by node variables stored between library calls. Can I use the variables in that reactant class to store things? Could I ignore the intended purpose of the, for example, order1 double to store the fraction of high surface area pyrite? Would this break anything? I think I would have to update the variable at the beginning of each time step to account for the changes in the previous time step, correct? Perhaps this could be done in a simpler way, but I'm not sure it could. Defining two different pyrites in the thermo database and having kinetic laws for each doesn't really work. Two minerals with matching compositions reacting leads to convergence issues even if they are kinetically defined. Having the library store things in a file would be complicated by the parallel function calls. Thanks, Peter Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted April 23 Share Posted April 23 Hello Peter, There is theoretically nothing stopping you from overwriting a memory location. However, 'Order1', for example, is defined reactant by reactant in the Reactant class. Based on your description, it appears that you would want to use a member from the Reactant_status class instead of reactants. A member in the Reactant_status class is reported at every nodal block. Hope this helps, Jia Wang Aqueous Solutions LLC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.