
saveVtk ( "makeSpherical.An accurate, effcient and scalable cubed-sphere grid framework is described for simu-lation of magnetohydrodynamic (MHD) space-physics flows in domains between two con-centric spheres. makeSpherical ( center, vx, vz, tr, crit ) grid2. saveVtk ( "makeSphericalUni.vtk" ) # Custom Spherical Grid- tr = # a list of radiuses (one radius for each layer) grid2 = doc. makeSphericalUni ( center, vx, vz, rayon, nbLayers, crit ) grid1. addVector ( 0, 1, 1 ) rayon = 1 grid1 = doc. saveVtk ( "makeSphericalTop.vtk" ) # Uniform Spherical Grid - center = doc. makeSphericalTop ( nbLayers, crit ) grid0. addDocument ( "Spherical Grid Test" ) # Simple Spherical Grid - nbLayers = 3 crit = 0 grid0 = doc.
Sphere grids software#
# You should have received a copy of the GNU Lesser General Public # License along with this library if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # See or email : # Concentric (Spherical) Grid Test # import hexablock doc = hexablock. See the GNU # Lesser General Public License for more details. # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # -*- coding: utf-8 -*- # Copyright (C) 2009-2016 CEA/DEN, EDF R&D # This library is free software you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation either # version 2.1 of the License, or (at your option) any later version. makeRind ( center, vx, vz, trad, tang, tphi ) rind2. append ( - 90 + nro * dphi ) rind2 = doc. append ( nro * dtheta ) for nro in range ( nh + 1 ): tphi. append ( rint + nro * dr ) for nro in range ( na + 1 ): tang. append ( rtrou ) for nro in range ( nr + 1 ): trad. saveVtk ( "makeRindUni.vtk" ) # Custom Rind - dr = ( rext - rtrou ) / nr dtheta = angle / na dphi = 180.0 / nh trad = tang = tphi = trad. makeRindUni ( center, vx, vz, rtrou, rint, rext, angle, vplan, nr, na, nh ) rind1. addVector ( 0, 0, 1 ) rtrou = 1 rint = 8 rext = 10 angle = 180 rind1 = doc. saveVtk ( "makeRindTop.vtk" ) # Uniform Rind - center = doc. addDocument ( "Rind Grid Test" ) # Simple Rind - nr = 4 na = 8 nh = 12 rind0 = doc. # You should have received a copy of the GNU Lesser General Public # License along with this library if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # See or email : # Rind Grid Test # import hexablock doc = hexablock. makeSphere ( center, vx, vz, trad, tang, tphi ) sphere2. append ( - 90 + nro * dphi ) sphere2 = doc. append ( rtrou + nro * dr ) for nro in range ( na + 1 ): tang. saveVtk ( "makeSphereUni.vtk" ) # Custom Sphere - dr = ( rext - rtrou ) / nr dtheta = angle / na dphi = 180.0 / nh trad = tang = tphi = for nro in range ( nr + 1 ): trad. makeSphereUni ( center, vx, vz, rtrou, rext, angle, vplan, nr, na, nh ) sphere1.

addVector ( 0, 0, 1 ) rtrou = 1 rext = 10 angle = 180 sphere1 = doc. saveVtk ( "makeSphereTop.vtk" ) # Uniform Sphere - center = doc. addDocument ( "Sphere Grid Test" ) # Simple Sphere - nr = 4 na = 8 nh = 12 sphere0 = doc. # You should have received a copy of the GNU Lesser General Public # License along with this library if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # See or email : # Sphere Grid Test # import hexablock doc = hexablock.
