Jump to content
Geochemist's Workbench Support Forum

Chemplugin: adjust fugacity (not using "sliding")


Recommended Posts

Hi

In my problem I have a situation where conditions will change fairly abruptly from oxic to anoxic (so I dont want to use sliding).

Is it possible to adjust the fugacity (or cancel the "fix" fugacity) of a gas "on the fly" when using chemplugin? 

I tried it but it seems like it doesnt want to work. 

 

If not, what will be the best solution? 

Thanks

J

Link to comment
Share on other sites

I see one can "fix" the fugacity and then at some time step starts to "slide fugacity" but I still prefer to "unfix" it so that there is no oxygen buffer anymore......

( I tried to slide log fugacity O2 but it does not want to run then)

 

image.thumb.png.322bc92bead56f8c68d9623f4027b2cd.png

Link to comment
Share on other sites

Hello Johan,
 
Unfortunately there's no way to unfix or remove the fugacity as a reactant in the middle of a simulation. According to your screenshot above, it seems like you wish to change the fugacity constraint at about 300 days. I would suggest you try using the pickup command. You can first set the simulation for a 300 day duration under oxic condition and then use the pickup command to use the result at the end as a new starting point. The pickup command does not preserve fugacity values from the previous simulation so you can set a new value that suits the condition for your needs. For more information on the pickup command, please see chapter Appendix: Configuration Commands.
 
Please let us know if this is solution is helpful and if you would like more specific troubleshooting, please attach your input file so we can take a closer look.
 
Best regards,
Jia Wang
Link to comment
Share on other sites

Hello Johan,

There are actually several options with the pickup command. When you do a simple "pickup" (i.e. "pickup system = entire"), ChemPlugin will retain the entire system (both minerals and fluid) at the end of your first simulation and all kinetic reactions that were defined in the original path. If you specify "pickup fluid" (i.e. "pickup system = fluid"), then the system will only carry the solution results and discard the minerals from your previous simulation, but will still preserve the original kinetic redox and aqueous complexations reactions occurring within the fluid. There are also options to pickup simulation results as reactants as well. You can find these described in detail in the Appendix: Configuration Commands chapter. 

Best regards,
Jia 

Link to comment
Share on other sites

Hi Jia

I haven't come right with "pickup". The model just does not want to converge after "pickup". Or maybe I don't apply it correctly - but I have tried several variations and could not get it running. I can send you a small dummy code if you want to see what I did wrong with pickup.

As an alternative what I did, is to run the model initially by removing the O2 buffer altogether, adding "react O2" until I get the oxic conditions  - therefore creating a pseudo-O2buffer. My solution is not ideal as I add O2 constantly but it is not exactly constantly consumed over time. Then for the second run I "extend" the model (after "adjust" the kinetic mineral mass to the last remaining mass as "extend" keep equilibrium minerals but reset the kinetic mineral mass for some reason) and also "adjust_rate O2(aq) 0 mg/hour". 

It is working and I get the oxic/anoxic transition, however it is quite cumbersome and I would be very glad if there was an eazy option to just "unfix" the O2 buffer. Do you think this will be something you guys might implement in future? 

Regards

Johan

Edit: Using the cp.Report1("mass_reacted O2(aq)"," mg") function it was possible to adjust the amount of O2 put back to what was consumed in the previous time-step, creating a more realistic O2 buffer in Model 1 than the constant one. Still, it would be great if you guys could look into the "unfix" option.......

 

Link to comment
Share on other sites

Hello Johan,

If you can provide a dummy script for the error you encounter, we can take a closer look at what might be causing the issue. Can you send it to support@gwb.com or attach the script below? 

Thank you for sharing your solution. We currently don't have any plans to allow unfixing buffers during a simulation but I will certainly pass your suggestion onto our development team. 

Best regards,
Jia 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...