
In order to get your model to run from a command line, I had to put the following DLL files in the same directory as the TOUGHREACT executable. MAXI is the builtin macro variable accessible to macro language.I see that you are using TOUGHREACT v3.32, which is not quite as integrated with PetraSim as TOUGHREACT v1.2. Please note that in the above two equations operate on same zone, in python mode, zone 0 refers to zone 1 in macro language in which the equation is written. Or equivalently tp._equation("v5 = v5/MAXI:") I made enough comments to get you started, the lines zone = dataset.zone(0)Ĭould however be replaced by the following single line tp._equation("v5 = v5/MAXI", zones=dataset.zone(0)) Tp.export.save_png(os.path.splitext(filename) + "_plot_fft.png", # finally save the data, better save as 'lpk', rather than 'lay' # once you change the value, you need to switch it back from # the zone.dimensions only work for ordered zones # the following will work for any other type of zone as well

# now lets get the variable as a python numpy array to change its value # unlike macro, so to get the first zone, dataset.zone(0) # (pytecplot) the zone numbers and other index start from 0,

# I believe your are trying to access the first zone, in python # I am not sure that this data loader will work with your file, Using Python, here is I how I would do it. The problem is that I need to have c changing inside the execute equation

Tp.save_layout(os.path.splitext(filename) + "_plot_fft.lay", #get IMax from data set information and divide V5 with c=IMaxĬurrent_dataset = tecplot.active_frame().dataset Sorry if it is not clear, I will edit it on demand.ĮDIT: This is part of the script i have written #!/usr/bin/env pythonįrom nstant import ValueLocationĭatafile = os.path.join(working_dir, filename)ĭataset = _tecplot(datafile) The problem is that I cannot find a way to loop through each one of my.

dat file (that I plot as a XY plot) I want to alter a variable V5, by dividing it with a constant IMax that differs for each. The question that I have arises in the following way: For each. I have written a small script for this reason. dat files to process by doing repetitive calculations on them.
