Skip to content
Snippets Groups Projects
Commit bab75432 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

comments + explain how to force getdp location (fixes #3 and #4)

parent b3257b60
No related branches found
No related tags found
No related merge requests found
......@@ -130,6 +130,7 @@ Function {
eta0 = 120*Pi ; // eta0 = Sqrt(mu0/eps0)
// FIXME: CG "Y[]" should be 0 in 3D !?
dR[] = (Flag_3Dmodel) ? Unit[ Vector[Sin[Atan2[Z[],X[]]#1], Y[], -Cos[#1]] ] : Vector[0,0,-1] ;
......
......@@ -13,9 +13,13 @@ import onelab
# create a new onelab client
c = onelab.client(__file__)
# get Gmsh and GetDP locations from Gmsh options
# get Gmsh location from Gmsh options
mygmsh = c.getString('General.ExecutableFileName')
mygetdp = ''
# Either force GetDP location, or also get it from Gmsh options: adapt the
# following line if you want to force the value:
mygetdp = '' # '/usr/local/bin/getdp'
if(not len(mygetdp)):
for s in range(9):
n = c.getString('Solver.Name' + str(s))
if(n == 'GetDP'):
......@@ -24,7 +28,8 @@ for s in range(9):
if(not len(mygetdp)):
c.sendError('This appears to be the first time you are trying to run GetDP')
c.sendError('Please run a GetDP model interactively once with Gmsh to ' +
'initialize the solver location')
'initialize the solver location; or set the location by by hand ' +
'in the python script' )
exit(0)
c.sendInfo('Will use gmsh={0} and getdp={1}'.format(mygmsh, mygetdp))
......@@ -58,4 +63,3 @@ for angle in angles:
torque = c.getNumber('Output - Mechanics/0Torque [Nm]/rotor')
c.sendInfo('Torque={0} for angle={1}'.format(torque, angle))
......@@ -48,7 +48,7 @@ Function {
// OO2 Gander 2002, pp. 46-47
xsimin = 0;
xsimax = Pi / LC;
deltak[] = Pi;
deltak[] = Pi; // Ruyiang+Nicolas test Pi/0.06
alphastar[] = I[] * ((k[]^2 - xsimin^2) * (k[]^2 - (k[]-deltak[])^2))^(1/4);
betastar[] = ((xsimax^2 - k[]^2) * ((k[]+deltak[])^2 - k[]^2))^(1/4);
a[] = - (alphastar[] * betastar[] - k[]^2) / (alphastar[] + betastar[]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment