Пример #1
0
def update_mask_fns():

    faultRmfn = tm.variable_boundary_mask_fn(distMax=ndimlz(100 * ur.km),
                                             distMin=ndimlz(20 * ur.km),
                                             relativeWidth=0.1,
                                             boundtypes='ridge')

    ###The following mask function provide a way of building velocity conditions within the plates,

    velMask1 = tm.variable_boundary_mask_fn(distMax=1e6,
                                            distMin=0.0,
                                            relativeWidth=0.85,
                                            minPlateLength=ndimlz(50 * ur.km),
                                            out='bool',
                                            boundtypes='ridge')

    velMask2 = tm.plate_interior_mask_fn(relativeWidth=0.95,
                                         minPlateLength=ndimlz(10 * ur.km),
                                         invert=False)

    velMaskFn = operator.and_(velMask1, velMask2)

    #the following dictates where the fault rheology will be activated
    subZoneDistfn = tm.subZoneAbsDistFn(upper=True)

    faultHorizTaperFn = cosine_taper(subZoneDistfn,
                                     md.faultViscHorizTaperStart,
                                     md.faultViscHorizTaperWidth)

    return faultRmfn, velMaskFn, faultHorizTaperFn
Пример #2
0
                                                 interfaceYielding),
                                     viscmin=ndp.viscosityMinInterface,
                                     viscmax=ndp.viscosityMaxInterface)

else:  # an equivalent visc implementation
    ndp.effStrainRate = ndp.subVelocity / ndp.faultThickness
    effStressUpper = ndp.cohesionInterface + (depthFn * ndp.frictionInterface)
    interfaceYielding = effStressUpper / (2. * ndp.effStrainRate)
    #combine
    interfaceViscosityFn = safe_visc(fn.misc.min(interfaceCreep,
                                                 interfaceYielding),
                                     viscmin=ndp.viscosityMinInterface,
                                     viscmax=ndp.viscosityMaxInterface)

#finally apply the taper that swtaiches off the interface viscosity over spicified inteface
depthTaperFn = cosine_taper(depthFn, ndp.crustViscCutoffDepth,
                            ndp.crustViscEndWidth)
interfaceViscosityFn = interfaceViscosityFn * (
    1. - depthTaperFn) + depthTaperFn * mantleViscosityFn

# In[36]:

viscosityMapFn = fn.branching.map(fn_key=proximityVariable,
                                  mapping={
                                      0: mantleViscosityFn,
                                      1: interfaceViscosityFn
                                  })

# viscosityTI2_fn = viscosityMapFn - 10.
#
# # This one maps to my fault-proximity variable (which also picks only materialV)
# viscosity2Map    = { 0: 0.0,
Пример #3
0
#Set up any functions required by the rheology
strainRate_2ndInvariant = fn.tensor.second_invariant(
    fn.tensor.symmetric(velocityField.fn_gradient))


def safe_visc(func, viscmin=md.viscosityMin, viscmax=md.viscosityMax):
    return fn.misc.max(viscmin, fn.misc.min(viscmax, func))


# In[63]:

#Interface rheology extent

subZoneDistfn = tm.subZoneAbsDistFn(upper=True)

faultHorizTaperFn = cosine_taper(subZoneDistfn, md.faultViscHorizTaperStart,
                                 md.faultViscHorizTaperWidth)
faultDepthTaperFn = cosine_taper(depthFn, md.faultViscDepthTaperStart,
                                 md.faultViscDepthTaperWidth)

# In[65]:

temperatureFn = proxyTempVariable

adiabaticCorrectFn = depthFn * ndp.adiabaticTempGrad
dynamicPressureProxyDepthFn = pressureField / pressureDepthGrad
druckerDepthFn = fn.misc.max(
    0.0, depthFn + md.druckerAlpha * (dynamicPressureProxyDepthFn))

#Diffusion Creep
diffusionUM = (1. / ndp.diffusionPreExp) * fn.math.exp(
    ((ndp.diffusionEnergyDepth + (depthFn * ndp.diffusionVolumeDepth)) /