6/16/2023 0 Comments TecplotMAXI is the builtin macro variable accessible to macro language. 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 _png(os.path.splitext(filename) + "_plot_fft.png", 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 Bilimsel bir hesaplama ve görselletirme program olan Tecplot tarafndan oluturulan diyagram düzeni dosyas bir çizimin görsel düzenini (.PLT dosyas) çalma alanna kaydeder çizimin nasl görüntüleneceine ilikin talimatlarn yan sra her karenin görünümünü tanmlayan ayarlar içerir. 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.
0 Comments
Leave a Reply. |