Example #1
0
from __future__ import division
from tecplot import Tecplot

from GeoMACH.PAM.configurations.conventional import Conventional


if __name__ == '__main__':

    name = 'conventional'
    aircraft = Conventional()
    aircraft.oml0.addVars(['der'])

    t = Tecplot()
    counter = 100   
    for c in aircraft.comps.keys():
        comp = aircraft.comps[c]
        for p in comp.params.keys():
            par = comp.params[p]
            for j in range(par.P.shape[1]):
                for i in range(par.P.shape[0]):
                    print c, p, i, j
                    der = aircraft.getDerivatives(c, p, (i,j), clean=False, FD=False)
                    aircraft.oml0.P0[:,6] = aircraft.oml0.exportPjtn(der)
                    aircraft.oml0.write2Tec(name+str(counter))
                    t.importDataSet(name+str(counter),aircraft.oml0.var,True)
                    t.setTransparency(False)
                    t.setCamera(66.0214, 133.832, -140.403, -251, 268, 170.3)
                    t.plotContours(7)
                    t.writeImage('temp%03d'%(counter))
                    counter += 1
Example #2
0
from __future__ import division
from tecplot import Tecplot
import numpy, time
import sys

from GeoMACH.PAM.configurations.conventional import Conventional



name = 'conventional'
aircraft = Conventional()
aircraft.oml0.addVars(['der'])

t = Tecplot()
counter = 100   
for c in aircraft.comps.keys():
    comp = aircraft.comps[c]
    for p in comp.params.keys():
        par = comp.params[p]
        for j in range(par.P.shape[1]):
            for i in range(par.P.shape[0]):
                print c, p, i, j
                der = aircraft.getDerivatives(c, p, (i,j), clean=False, FD=False)
                aircraft.oml0.P0[:,6] = aircraft.oml0.exportPjtn(der)
                aircraft.oml0.write2Tec(name+str(counter))
                t.importDataSet(name+str(counter),aircraft.oml0.var,True)
                t.setTransparency(False)
                t.setCamera(66.0214, 133.832, -140.403, -251, 268, 170.3)
                t.plotContours(7)
                t.writeImage('temp%03d'%(counter))
                counter += 1
Example #3
0
        aircraft.writeStructure('temp'+str(counter))
        counter += 1

    n = 50
    for i in range(n):
        v = i/(n-1)
        c['fuse'].setSections(sections=[2,3,4,5], t1L=0.35*v, t2L=1.0-0.35*v)
        c['fuse'].props['posy'].set([0.5-0.2*v,0.5,0.5],[0,0.15,1],w=[1.0,0,0],d=[1,0,0])
        c['fuse'].props['ry'].set([0.3-0.2*v,0.5,0.5,0.1],[0,0.15,0.75,1.0],w=[0.9985,0,0,0],d=[1,0,0,0])
        c['fuse'].props['rz'].set([0.3-0.2*v,0.5,0.5,0.1],[0,0.15,0.75,1.0],w=[0.9985,0,0,0],d=[1,0,0,0])
        c['fuse'].props['noseL'] = 0.3-0.2*v
        aircraft.computePoints()       
        aircraft.export.write2Tec('temp'+str(counter))
        aircraft.writeStructure('temp'+str(counter))
        counter += 1

    t = Tecplot()
    for i in range(counter):
        t.importDataSet('temp'+str(i),True)
        t.createMirror(1,165,3)
        t.importDataSet('temp'+str(i)+'_str')
        t.setTranslucency(1,2617,50)
        t.setTranslucency(166,330,1)
#        t.setTransparency(False)
        t.setRelCameraPosition(-20, 10, 20, -140)
        t.writeImage('temp%03d'%(i))
    t.runTecplot()
    for i in range(counter,counter+30):
        os.system('cp temp%03d.png temp%03d.png'%(counter-1,i))
    t.makeVideo()