#------------------------------------------------------------------------------- # A mock ICF kind 'o problem. #------------------------------------------------------------------------------- from math import * from Spheral import * from SpheralTestUtilities import * from SpheralGnuPlotUtilities import * from SpheralVisitDump import dumpPhysicsState from findLastRestart import findLastRestart from GzipFileNodeGenerator import * # Load the mpi module if we're parallel. import loadmpi mpi, rank, procs = loadmpi.loadmpi() title("2-D ICF test problem") #------------------------------------------------------------------------------- # Generic problem parameters #------------------------------------------------------------------------------- commandLine( NodeListConstructor=AsphNodeList2d, rhoAir=1.4, rhoDrive=0.1, rhoShell=1.0, PAir=1.0, PDrive=100.0, PShell=1.0, gammaAir=1.4, gammaDrive=1.4, gammaShell=1.6,
#------------------------------------------------------------------------------- # The evolution of a uniform, magnetized conducting fluid. #------------------------------------------------------------------------------- from math import * from Spheral import * from SpheralTestUtilities import * from SpheralVisitDump import dumpPhysicsState from findLastRestart import * # Load the mpi module if we"re parallel. import loadmpi mpi, procID, numProcs = loadmpi.loadmpi() from GenerateNodeDistribution3d import * from CubicNodeGenerator import GenerateCubicNodeDistribution title("Dedner magnetic divergence test") #------------------------------------------------------------------------------- # Generic problem parameters #------------------------------------------------------------------------------- commandLine( seed="lattice", n=20, rho0=1.0, V0=Vector3d(1.0, 1.0, 0.0), Bz=1.0 / sqrt(4 * pi), P0=6.0, nPerh=1.3, mu0=1.0, gamma=5.0 / 3.0,
from Numeric import * from Spheral import * from SpheralTestUtilities import * from SpheralGnuPlotUtilities import * from SodAnalyticSolution import * import loadmpi mpi, rank, numprocs = loadmpi.loadmpi() title("1-D integrated hydro test -- planar LeBlanc shock tube problem") #------------------------------------------------------------------------------- # A function to generate our geometric progression of node properties, designed # to match the requested constant density. #------------------------------------------------------------------------------- def geometricNodeDistribution(nx, x0, x1, rho, hmultiplier, m0, m1): f = (m1 / m0)**(1.0 / nx) - 1 integral = 0.0 for i in xrange(nx): integral = integral + (1.0 + f)**i dx0 = (x1 - x0) / integral print "x0, x1", x0, x0 + integral * dx0 x = [x0] m = [m0] h = [1.0 / (hmultiplier * dx0)] for i in xrange(1, nx): facprev = (1.0 + f)**(i - 1) dxprev = dx0 * facprev fac = (1.0 + f)**i