.. _updateMaterialStage: updateMaterialStage Command *************************** This command changes the stage of a material during an analysis. It is used mainly with geotechnical materials, so that the soil can respond elastically while the gravity loads are applied and then be switched to elastoplastic (or undrained) behavior for the static or dynamic loading that follows. .. tabs:: .. tab:: Tcl .. function:: updateMaterialStage -material $matTag -stage $value <-parameter $paramTag> .. tab:: Python .. code-block:: python ops.updateMaterialStage('-material', matTag, '-stage', value, <'-parameter', paramTag>) .. csv-table:: :header: "Argument", "Type", "Description" :widths: 10, 10, 40 $matTag, |integer|, tag of the material whose stage is to be changed $value, |integer|, "the new stage. What the values mean depends on the material (see the table below); usually 0 is elastic and 1 is elastoplastic." $paramTag, |integer|, "tag of the temporary parameter used to make the change (optional). It must not be the tag of an existing parameter. The default is one more than the number of parameters (Tcl) or one more than the largest parameter tag (Python)." How It Works ============ The command creates a temporary parameter, searches the elements in the domain for one whose materials accept the request ``updateMaterialStage $matTag``, sets the stage and then removes the parameter. It must therefore be called after the elements are created. If no element uses a material that accepts the request, the warning ``MaterialStageParameter::setDomain() - no effect with material tag ...`` is printed and nothing is changed. The search stops at the **first element** that accepts the request. Only the material points of that element are set directly. This works because most of the materials listed below store their stage in a variable that is shared by more than one material point: * **per tag**: shared by all material points created from the same material tag. * **per type**: shared by all materials of that type, *whatever their tag*. Changing the stage of one of them changes it for all of them. * **per point**: each material point has its own stage. Only the material points of the first element found are changed (see the warnings in the table). Materials That Use It ===================== .. warning:: For the materials marked **per type** in the table (PM4Sand, PM4Silt, ManzariDafalias, SAniSandMS, J2CyclicBoundingSurface, CycLiqCP, CycLiqCPSP, PyLiq1, TzLiq1 and QzLiq1), the stage is shared by every material of that type in the model. ``updateMaterialStage`` changes the stage of **all** of them, not only the one with ``$matTag``. Different layers modeled with the same material type therefore cannot be given different stages, e.g. one PM4Sand layer kept elastic while another is switched to elastoplastic. .. csv-table:: :header: "Material", "Stage values", "Shared", "Notes" :widths: 20, 30, 10, 40 :ref:`PressureIndependentMultiYield`, "0 linear elastic, 1 elastoplastic", per tag, :ref:`PressureDependentMultiYield`, "0 linear elastic, 1 elastoplastic, 2 linear elastic with moduli scaled to the confinement when stage 2 is set", per tag, :ref:`PressureDependentMultiYield02`, "0, 1, 2 as above", per tag, :ref:`PressureDependentMultiYield03`, "0, 1, 2 as above", per tag, :ref:`FluidSolidPorous`, "0 combined bulk modulus of the fluid not included (drained), not 0 included (undrained)", per tag, "If ``$matTag`` is not the tag of the FluidSolidPorous material, the request is passed on to the soil material it contains, so the soil material's stage can be set through it." :ref:`PM4Sand`, "0 elastic, 1 elastoplastic", per type, "**Warning:** all tags of this type are changed." :ref:`PM4Silt`, "0 elastic, 1 elastoplastic", per type, "**Warning:** all tags of this type are changed." :ref:`ManzariDafalias`, "0 elastic, 1 elastoplastic", per type, "**Warning:** all tags of this type are changed. When set to 1, the state of the material points of the first element found is adjusted to lie inside the bounding surface. The other material points are not adjusted." :ref:`SAniSandMS`, "0 elastic, 1 elastoplastic", per type, "**Warning:** all tags of this type are changed." :ref:`J2CyclicBoundingSurface`, "0 elastic, 1 elastoplastic, 2 viscoelastic", per type, "**Warning:** all tags of this type are changed." :ref:`CycLiqCP`, "0 elastic, 1 elastoplastic", per type, "**Warning:** all tags of this type are changed." :ref:`CycLiqCPSP`, "0 elastic, 1 elastoplastic", per type, "**Warning:** all tags of this type are changed." :ref:`StressDensity`, "0 elastic, 1 elastoplastic", per point, "**Warning:** only the material points of the first element found are changed. Also, the material does not check ``$matTag``, so the request is accepted by the first stressDensity material found, whatever its tag (and can stop the search before it reaches the material that was meant)." :ref:`InitialStateAnalysisWrapper`, "passed to the wrapped material", "as wrapped material", "Use the tag of the wrapper. The value is passed to the wrapped material, so its meaning is that of the wrapped material." :ref:`PyLiq1`, "0 (default) independent of pore pressure, 1 depends on pore pressure", per type, "**Warning:** all tags of this type are changed. Also, the value given is ignored; any call sets the stage to 1, and it cannot be set back to 0." :ref:`TzLiq1`, "0 (default), 1 as for PyLiq1", per type, "**Warning:** as for PyLiq1." :ref:`QzLiq1`, "0 (default), 1 as for PyLiq1", per type, "**Warning:** as for PyLiq1." DruckerPragerThermal, "less than 2 elastic, 2 elastoplastic (default)", per point, "**Warning:** the new stage is read from the wrong field of the parameter, so the value given is not used and the resulting stage is undefined. Only the material points of the first element found are changed. Do not use." Other materials do not respond to the command, including: * :ref:`DruckerPrager`, which explicitly ignores it. Its elastic/plastic state is changed with the ``materialState`` parameter instead. * VonPapaDamage, which mentions the command in a comment only. .. note:: #. ``$value`` must be an integer. #. A typical sequence is: apply gravity with stage 0, analyze to equilibrium, call ``updateMaterialStage`` with stage 1, then apply the dynamic loading. #. For Tcl, if the model already defines parameters, the default ``$paramTag`` may be in use. Give an unused tag with ``-parameter`` in that case. .. admonition:: Example: The following example sets the stage of material **1** to elastoplastic after the gravity analysis. .. tabs:: .. tab:: Tcl .. code-block:: tcl # gravity, elastic updateMaterialStage -material 1 -stage 0 analyze 10 # switch to elastoplastic updateMaterialStage -material 1 -stage 1 analyze 10 .. tab:: Python .. code-block:: python # gravity, elastic ops.updateMaterialStage('-material', 1, '-stage', 0) ops.analyze(10) # switch to elastoplastic ops.updateMaterialStage('-material', 1, '-stage', 1) ops.analyze(10) Code Developed by: |zhy|