Beispiel #1
0
def createMonatomicGas(elm, pascal):
    """createMonatomicGas(elm, pascal)
    Create a gas of single atoms of the specified element at the specified pressure in Pascal and 300 K"""
    return epq.Gas((elm,), (1,), pascal, 300.0, elm.toString() + " gas at %f Pa" % pascal)
Beispiel #2
0
def createGas(comp, pascal):
    """createGas(comp, pascal)
    Create a gas from a composition at the specified pressure in Pascal at 300 K.
    Ex: createGas("H2O", 0.1)"""
    return epq.Gas(dtsa2.material(comp), pascal, 300.0)
Beispiel #3
0
    nm3.EmissionImageBase.useHeatMapPalette()

def configureVoxelated(dim=20, size=2.e-6, generated=True):
    return { 'Voxelated' : dim, 'GeneratedV' : generated, 'SizeV' : size }

def configureVRML(nElectrons=40):
    return { 'VRML' :  nElectrons }

def toPascal(torr):
    return torr * 133.32237

def toTorr(pascal):
    return pascal / 133.32237

if 'defaultGas' not in globals():
    defaultGas = epq.Gas((epq.Element.H, epq.Element.O,), (2, 1,), toPascal(0.1), 300.0, "Water vapor")

def createMonatomicGas(elm, pascal):
    """createMonatomicGas(elm, pascal)
    Create a gas of single atoms of the specified element at the specified pressure in Pascal and 300 K"""
    return epq.Gas((elm,), (1,), pascal, 300.0, elm.toString() + " gas at %f Pa" % pascal)

def createGas(comp, pascal):
    """createGas(comp, pascal)
    Create a gas from a composition at the specified pressure in Pascal at 300 K.
    Ex: createGas("H2O", 0.1)"""
    return epq.Gas(dtsa2.material(comp), pascal, 300.0)

def configureVariablePressure(pathLength, gas=defaultGas):
    return { 'VP' : (pathLength, gas) }