Ejemplo n.º 1
0
	a.suptitle("Lift and Drag forces over time", fontsize=16)
	ax1 = a.add_subplot(211)
	ax1.set_title("Lift Force")
	ax1.plot(x, y1, c)
	ax2 = a.add_subplot(212)
	ax2.set_title("Drag Force")
	ax2.plot(x, y2, c)
	a.savefig(image, format='png')

params = {'angle_start':2, 'angle_stop':4, 'n_angles':1, 'n_nodes':10, 'n_levels':1} #dictionnary of the gmsh params

airfoil_params = {'num_samples':10, 'visc':0.001, 'speed':10, 'T':0.1} #dictionnary of the airfoil params 

show = 0 #global variable to handle the website

get_file('plots.db','plots.db')  #downloads the database from the container

db = pickledb.load('plots.db', False)	#loads it as the current database to use

n_workers = 0 #global variable used to keep track on how much worker you use

@app.route('/')
#returns the main page index.html
def index():
    return render_template('index.html')
    
@app.route('/signup', methods = ['POST'])
#handles the mesh parameters submission 
#returns index.html
def signup():
	for i in params.keys():
Ejemplo n.º 2
0
	ax1.plot(x, y, c)
	ax2 = a.add_subplot(212)
	ax2.set_title("Drag Force")
	ax2.plot(x, z, c)
	a.savefig(image, format='png')

params = {'angle_start':2, 'angle_stop':4, 'n_angles':1, 'n_nodes':10, 'n_levels':1} #dictionnary of the gmsh params

airfoil_params = {'num_samples':10, 'visc':0.001, 'speed':10, 'T':0.1} #dictionnary of the airfoil params 

status="PENDING"
results="Not ready yet... Reload the page!"

show = 0

get_file('plots.db','plots.db')

db = pickledb.load('plots.db', False)

#for i in db.getall():
#	get_file(i, 'static/'+i)

n_workers = 0

@app.route('/')
def index():
    return render_template('index.html')
    
@app.route('/hello/<name>')
def hello(name=None):
    return render_template('hello.html', name=name)