Jump to content
Geochemist's Workbench Support Forum

python x1t example?


jakatch

Recommended Posts

Hi all, 

I am looking to write a python script using the GWB python plug-in to run a 'x1t' simulation. I see an example of a python script for the 'spece8' application but I was wondering if you could provide example(s) of a python script using the 'x1t' application? I'm trying to understand specifically what kind of set-up is required for 'x1t' - specifically, how to properly set up the lists for the domain, the initial and inlet fluids, etc. (see the 'cmds' variable in the GWBplugin_Python_example2.py file that you provide when downloading GWB).

 

Thanks!

Jo

Link to comment
Share on other sites

Hello Jo,

We do not have a specific GWB Plugin example with X1t but here are a few suggestions to help you get started. 

You can view examples of how to use the GWB Plugin with Python in the GWB Reference Manual. Section 7.5 is specific for setting up scripts in Python. While the example file installed with the software is a good place to start, this section will provide more details on how to configure commands and what they do. All documentations come installed with your software and you can open them by going to the "Doc" pane on the GWB dashboard or going to the "Help" menu on any of the applications. If they are deleted from your machine, you can always download them from our documentation page

You can find a comprehensive list of commands accepted by each GWB application in the GWB Reference Manual. This will be very helpful for you if you're just getting started in scripting with GWB commands. In the same manual, you will find the Report Command section, which list all the available commands for returning results from your run.

A trick that is useful for building your first script is to actually build the input script in python and as a regular GWB input file. If I run the regular input file and the python script, I can check if they produce the same results. Another useful tip is that every GWB input file (e.g. freshwater.spec8, pb_contamin.x1t) can by opened up in a text editor. You can then view the commands in the input file, which can be helpful to check if your configuration makes sense in your python script. 

Hope this helps,
Jia Wang
Aqueous Solutions LLC

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...