[CIG-SHORT] Problem setting initial conditions

Brad Aagaard baagaard at usgs.gov
Tue Feb 11 14:51:21 PST 2014


On 02/11/2014 01:52 PM, Oliver Boyd wrote:
> If I turn off the elastic prestep phase and keep total_time = 0, I
> get no stress or strain written to the hdf5 material files. If I
> increase total_time to 1 yr, I get essentially the same results as
> using the elastic prestep and total_time = 0, which is to say that I
> can match the stress in the material and tractions on the fault, but
> I can't match the strain in the material.
>
> I'm not sure I understand your question regarding output.
>
> If you mean adding initial strain to what I get from running problem
> 2, then yes, the strain resulting from problem 1 is the same as
> adding the initial strain to the output of problem 2. That's because
> in every case I've tried, the strain output from problem 2 is close
> to zero.

In the output, we are are currently dumping the strains computed from
the gradients in the displacement field. We are not dumping 
initial_strain + gradient in the displacement field (what you want to 
use in your comparison when you run the full problem without breaking it 
into pieces).

> If you mean including initial strain in the hdf5 output, I'm not
> sure how to add initial strains to the output. I thought my options
> were cell_data_fields = [total_strain,stress] for elastic materials
> and cell_data_fields = [total_strain,viscous_strain,stress] for
> viscoelastic.

Note that this is the *info* fields (for parameters, initial conditions, 
etc), not the *data* fields (for solution stuff).

cell_info_fields = [initial_strain]

Brad

>
>
>
> On 2/11/14 2:05 PM, "Brad Aagaard" <baagaard at usgs.gov> wrote:
>
>> Oliver,
>>
>> Did you try turning off the elastic prestep phase?
>>
>> [pylithapp.timedependent] elastic_prestep = False
>>
>> Are the strains the same if you add the initial strain to the
>> output strains? It might be an output issue rather than a setup
>> issue.
>>
>> Brad
>>
>> On 02/11/2014 01:01 PM, Oliver Boyd wrote:
>>> Hi Brad, Yes, that's exactly what I was trying to do, i.e. make
>>> the solution the same at the first time step, but I haven't been
>>> able to match the strains between problem 1 and 2, maybe because
>>> of the elastic prestep phase. I guess I'll have to solve my
>>> problem some other way.
>>>
>>> Thanks again, Brad and Charles, for your help. Oliver
>>>
>>> On 2/10/14 5:05 PM, "Brad Aagaard" <baagaard at usgs.gov> wrote:
>>>
>>>> Oliver,
>>>>
>>>> If you use the same boundary conditions in problems 1 and 2
>>>> and get the same answer in both problems, then your setup with
>>>> initial stress and strain is working properly for problem 2.
>>>> If you want to break up a simulation into pieces so that you
>>>> can solve something different, then your starting point for the
>>>> new simulations should be consistent with where you left off.
>>>> In other words, you can replace the BC and fault conditions,
>>>> etc to change the problem but you need to make sure the
>>>> solution is the same at the first time step.
>>>>
>>>> With a purely elastic material, the stress and strain in the
>>>> domain are irrelevant so you only need to transfer the fault
>>>> tractions (as in examples/2d/subduction/step04). For any bulk
>>>> rheologies with state variables (viscous strain), you may be
>>>> out of luck for right now as we have not implemented a way to
>>>> specify initial state variables for bulk constitutive models.
>>>>
>>>> We recognize that we are getting greater interest in setting
>>>> up these types of complicated simulations, where a user wants
>>>> to take the output of one simulation and use pieces from it as
>>>> input to another simulation. Implementing this right now
>>>> doesn't make sense, because we are about to reorganize a bunch
>>>> of top-level stuff to support multi-physics stuff. As we
>>>> reorganize things it will make sense to set things up so that
>>>> we can swap out the "elastic prestep" phase with an "initial
>>>> condition" phase or a "restart phase" to support this feature.
>>>> The new functionality probably wouldn't be implemented right
>>>> away but we will be able to add it or someone else could add
>>>> it relatively easily.
>>>>
>>>> Regards, Brad
>>>>
>>>>
>>>> On 02/10/2014 08:29 AM, Oliver Boyd wrote:
>>>>> Hi Charles, If I do as you suggest and apply identical
>>>>> boundary conditions in problem 2 as in problem 1 and apply
>>>>> both the initial stresses and strains from problem 1, I get
>>>>> the same output (from visual inspection) from problem 2 as
>>>>> from problem 1. Now I'd like to change the boundary
>>>>> conditions on the fault in problem 2. I want to lock the
>>>>> upper part of the fault and allow the lower to continue to
>>>>> slip in response to the stresses induced by the earthquake
>>>>> in problem 1. At this point, it seems to me that in order to
>>>>> be able to change the boundary conditions on the fault (and
>>>>> perhaps outer boundaries), I'd have to specify both
>>>>> initial_stress and initial displacements within the
>>>>> material? Alternatively, if I have to do this in a single
>>>>> simulation, I could use rate-and-state friction and an
>>>>> earthquake cycle. Ultimately, I might do this, but it could
>>>>> take a complex model a while to run.
>>>>>
>>>>> Oliver
>>>>>
>>>>> On 2/9/14 3:57 PM, "Charles Williams" <willic3 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Oliver,
>>>>>>
>>>>>> If you look in the material section of the manual it
>>>>>> explains how initial stresses and strains work.  In a
>>>>>> generic way, the stress is generally computed as:
>>>>>>
>>>>>> stress = material_matrix * (strain - initial_strain) +
>>>>>> initial_stress
>>>>>>
>>>>>> That means that if you have identical boundary conditions
>>>>>> for the two problems, if all of the stress were purely
>>>>>> elastic, your computed stress would just be equal to the
>>>>>> initial stress (the strain would cancel with the initial
>>>>>> strain and not generate any stress).  Since you have some
>>>>>> viscous strain, this won't be quite the case, but I'm
>>>>>> guessing it won't be too far off.  Unfortunately, we don't
>>>>>> yet make use of the other state variables (e.g., viscous
>>>>>> strain), or we could also take that into account.
>>>>>>
>>>>>> Have you tried the following:
>>>>>>
>>>>>> 1.  Apply identical BC for the two problems. 2.  Use both
>>>>>> initial stress and initial strain from problem 1 for
>>>>>> problem 2.
>>>>>>
>>>>>> You should end up with stresses that are pretty much the
>>>>>> same as what you had in problem 1.  The strains will also
>>>>>> look very similar at the beginning, because the computed
>>>>>> strains don't include initial strains. Strains are
>>>>>> computed purely from displacements, and are independent of
>>>>>> the material model.
>>>>>>
>>>>>> Let me know if this helps.  In the meantime, I think I'll
>>>>>> have a look at including all the initial state variables.
>>>>>>
>>>>>> Cheers, Charles
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 10/02/2014, at 11:10 am, Oliver Boyd <olboyd at usgs.gov>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Charles, Thanks for the suggestion. Yes, the initial
>>>>>>> conditions are different between the two problems. In
>>>>>>> the first, everything is driven by the boundaries. In
>>>>>>> the second, I wanted everything driven internally. The
>>>>>>> initial material stresses and strains in the second
>>>>>>> simulation result from the first simulation. If I keep
>>>>>>> the surficial driving boundary conditions and add
>>>>>>> internal stresses, the resulting material stresses
>>>>>>> double. I tried your suggestion of leaving one of the
>>>>>>> side boundaries free, but it produces very similar
>>>>>>> results.
>>>>>>>
>>>>>>> It also appears that strains are determined by surficial
>>>>>>> boundary conditions while initial stresses are
>>>>>>> determined by db_initial_stresses and db_initial_strains.
>>>>>>> When I specify db_initial_strain, it appears that it's
>>>>>>> converted to stress and then added to db_initial_stress.
>>>>>>> So I'm not sure I'll be able to pass the state from one
>>>>>>> simulation to another.
>>>>>>>
>>>>>>> Do you know where in the code it reads in
>>>>>>> db_initial_strain and where it might convert it to
>>>>>>> stress. Do you think I'd be able to get it to assign
>>>>>>> db_initial_strain to the strain field?
>>>>>>>
>>>>>>> Thanks for your help, Oliver
>>>>>>>
>>>>>>>
>>>>>>> On 2/9/14 1:30 PM, "Charles Williams"
>>>>>>> <willic3 at gmail.com> wrote:
>>>>>>>
>>>>>>>> Sorry for being slow to respond to this, Oliver.  I
>>>>>>>> haven't gone through everything in detail, but one
>>>>>>>> thing I noticed is that your boundary conditions on
>>>>>>>> the external boundaries are different for the two
>>>>>>>> problems, which means that you won't be able to get
>>>>>>>> the same stress/strain state for the two cases.  One
>>>>>>>> possible solution would be to leave one boundary free.
>>>>>>>> I'm not sure if this will work or not, but it's
>>>>>>>> probably worth a shot.
>>>>>>>>
>>>>>>>> Cheers, Charles
>>>>>>>>
>>>>>>>>
>>>>>>>> On 8/02/2014, at 6:50 am, Oliver Boyd
>>>>>>>> <olboyd at usgs.gov> wrote:
>>>>>>>>
>>>>>>>>> Hi Brad, Attached are some figures illustrating what
>>>>>>>>> I mean. In step1Kin, I use Dirichlet boundary
>>>>>>>>> conditions on the domain edges and specified 100 cm
>>>>>>>>> of fault slip on the fault. This generates stresses
>>>>>>>>> and strains in the materials and tractions on the
>>>>>>>>> fault as depicted in the figure step1Kin.png. If I
>>>>>>>>> let this simulation run, the viscoelastic layer will
>>>>>>>>>  relax. But I'd like to change the conditions on the
>>>>>>>>> fault surface. So as a first step, I wanted to
>>>>>>>>> transfer the stresses and strains to step2Kin and
>>>>>>>>> let them relax. In step2Kin, domain boundaries and
>>>>>>>>> fault surface initial displacement is zero. I am
>>>>>>>>> hoping to get step1Kin and step2Kin to show the same
>>>>>>>>> results after 200 years. But they don't. There is the
>>>>>>>>>  expected relaxation in step1Kin, but there is no
>>>>>>>>> relaxation in step2Kin. When I first transferred
>>>>>>>>> just the stress through db_initial_stress and looked
>>>>>>>>> at the stresses, strains, and tractions,
>>>>>>>>> step2Kin_stressini.png, I figured I only needed to
>>>>>>>>> transfer over the strains to make it look like
>>>>>>>>> step1Kin and everything would proceed as expected.
>>>>>>>>> But I haven't figured out how to transfer the
>>>>>>>>> strains properly. When I attempt to transfer both the
>>>>>>>>>  stresses and strains, They appear to be working
>>>>>>>>> against each other.
>>>>>>>>> (step2Kin_stress_strain_ini.png).
>>>>>>>>>
>>>>>>>>> Oliver
>>>>>>>>>
>>>>>>>>> On 2/6/14 4:45 PM, "Brad Aagaard"
>>>>>>>>> <baagaard at usgs.gov> wrote:
>>>>>>>>>
>>>>>>>>>> Oliver,
>>>>>>>>>>
>>>>>>>>>> For the db_initial_strain, you are correct in that
>>>>>>>>>> the values in the spatial database are strain-xx,
>>>>>>>>>> etc.
>>>>>>>>>>
>>>>>>>>>> I don't know what you mean by "seeing the initial
>>>>>>>>>> strain field being set". You can ask for the
>>>>>>>>>> "initial_strain" field to be written as one of the
>>>>>>>>>> cell info fields to check to make sure it is read
>>>>>>>>>> in and matches what you expect the spatial
>>>>>>>>>> database to produce. It does look like we may not
>>>>>>>>>> be including the initial strain in the
>>>>>>>>>> "total_strain" output field. Is this what you mean
>>>>>>>>>> by "not seeing the initial strain field being set"
>>>>>>>>>> or are you seeing the initial strain field not
>>>>>>>>>> affecting the solution in the way you expect?
>>>>>>>>>>
>>>>>>>>>> Brad
>>>>>>>>>>
>>>>>>>>>> On 02/03/2014 09:04 AM, Oliver Boyd wrote:
>>>>>>>>>>> Hi Brad, Thanks for your help. I had initially
>>>>>>>>>>> tried using db_initial_strain as well as several
>>>>>>>>>>> of other things. I did as you suggested below,
>>>>>>>>>>> but do not see the initial strain field being
>>>>>>>>>>> set after running step2Kin. Thanks for reminding
>>>>>>>>>>> me of the use of --component.help. I was trying
>>>>>>>>>>> to figure out what variables I needed to set in
>>>>>>>>>>> db_initial_strain. Based on the manual I thought
>>>>>>>>>>> it was strain-xx Š, but I wasn't sure. I thought
>>>>>>>>>>> I might be able to get to it with
>>>>>>>>>>> help-properties, but I still haven't figured that
>>>>>>>>>>> out. In any case, I'm still doing something
>>>>>>>>>>> wrong.
>>>>>>>>>>>
>>>>>>>>>>> Thanks again for your help, Oliver
>>>>>>>>>>>
>>>>>>>>>>> On 2/2/14 11:07 AM, "Brad Aagaard"
>>>>>>>>>>> <baagaard at usgs.gov> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Oliver,
>>>>>>>>>>>>
>>>>>>>>>>>> There are separate spatial databases for
>>>>>>>>>>>> initial stress and initial strain.
>>>>>>>>>>>>
>>>>>>>>>>>> [pylithapp.timedependent.materials.upper_crust]
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
db_initial_stress = spatialdata.spatialdb.SimpleDB
>>>>>>>>>>>> db_initial_stress.label = Initial stress in
>>>>>>>>>>>> upper crust
>>>>>>>>>>>> db_initial_stress.iohandler.filename =
>>>>>>>>>>>> spatialdb/afterslip_stress_uppercrust.spatialdb
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
db_initial_stress.query_type = nearest
>>>>>>>>>>>>
>>>>>>>>>>>> # ADD db_initial_strain db_initial_strain =
>>>>>>>>>>>> spatialdata.spatialdb.SimpleDB
>>>>>>>>>>>> db_initial_strain.label = Initial strain in
>>>>>>>>>>>> upper crust
>>>>>>>>>>>> db_initial_strain.iohandler.filename =
>>>>>>>>>>>> spatialdb/afterslip_strain_uppercrust.spatialdb
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
db_initial_strain.query_type = nearest
>>>>>>>>>>>>
>>>>>>>>>>>> Remember you can use pylith --COMPONENT.help
>>>>>>>>>>>> and --COMPONENT.help-properties and
>>>>>>>>>>>> --COMPONENT.help-components to interrogate
>>>>>>>>>>>> what properties and components are available.
>>>>>>>>>>>> In this case COMPONENT would be
>>>>>>>>>>>> timedependent.materials.upper_crust.
>>>>>>>>>>>>
>>>>>>>>>>>> pylith step1Kin.cfg
>>>>>>>>>>>> --timedependent.materials.upper_crust.help-components
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
facilities of 'elasticisotropic3d':
>>>>>>>>>>>> db_initial_state=<component name>: Database
>>>>>>>>>>>> for initial state variables. current value:
>>>>>>>>>>>> 'nullcomponent', from {default} configurable
>>>>>>>>>>>> as: nullcomponent, db_initial_state
>>>>>>>>>>>> db_initial_strain=<component name>: Database
>>>>>>>>>>>> for initial strain. current value:
>>>>>>>>>>>> 'nullcomponent', from {default} configurable
>>>>>>>>>>>> as: nullcomponent, db_initial_strain
>>>>>>>>>>>> db_initial_stress=<component name>: Database
>>>>>>>>>>>> for initial stress. current value:
>>>>>>>>>>>> 'nullcomponent', from {default} configurable
>>>>>>>>>>>> as: nullcomponent, db_initial_stress
>>>>>>>>>>>> db_properties=<component name>: Database for
>>>>>>>>>>>> physical property parameters. current value:
>>>>>>>>>>>> 'simpledb', from {default} configurable as:
>>>>>>>>>>>> simpledb, db_properties output=<component
>>>>>>>>>>>> name>: Output manager for elastic material
>>>>>>>>>>>> information. current value:
>>>>>>>>>>>> 'outputmatelastic', from {default} configurable
>>>>>>>>>>>> as: outputmatelastic, output
>>>>>>>>>>>> perf_logger=<component name>: Performance and
>>>>>>>>>>>> memory logging. current value: 'memory_logger',
>>>>>>>>>>>> from {default} configurable as: memory_logger,
>>>>>>>>>>>> perf_logger quadrature=<component name>:
>>>>>>>>>>>> Quadrature object for numerical integration.
>>>>>>>>>>>> current value: 'quadrature', from {default}
>>>>>>>>>>>> configurable as: quadrature
>>>>>>>>>>>>
>>>>>>>>>>>> Brad
>>>>>>>>>>>>
>>>>>>>>>>>> On 1/31/14 11:26 AM, Oliver Boyd wrote:
>>>>>>>>>>>>> Hello, I'm trying to generate a set of
>>>>>>>>>>>>> initial conditions in one problem and then
>>>>>>>>>>>>> use them in another. The first problem
>>>>>>>>>>>>> calculates the stress changes due to an
>>>>>>>>>>>>> earthquake. Currently, the second problem
>>>>>>>>>>>>> only looks at the viscoelastic response
>>>>>>>>>>>>> (which of course can be done in the first
>>>>>>>>>>>>> problem). Once I get the viscoelastic
>>>>>>>>>>>>> response in the second problem to equal the
>>>>>>>>>>>>> first (if I let the first progress through
>>>>>>>>>>>>> time), I will change the fault interface
>>>>>>>>>>>>> model, but this is not yet implemented.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I'm able to transfer over the initial stress
>>>>>>>>>>>>> through db_initial_stress but I don't know
>>>>>>>>>>>>> how to transfer the initial strain. I've
>>>>>>>>>>>>> tried putting the initial strain in the
>>>>>>>>>>>>> db_initial_stress.iohandler.filename file
>>>>>>>>>>>>> with the components given by p71 of the
>>>>>>>>>>>>> manual, but they don't appear to have an
>>>>>>>>>>>>> effect when I run the simulation. Attached
>>>>>>>>>>>>> are the files needed for the simulation.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks for your assistance, Oliver
>>>>>>>>>>>>>
>>>>>>>>>>>>> Flow pylith step1Kin.cfg python
>>>>>>>>>>>>> afterslip_initial_parms.py pylith
>>>>>>>>>>>>> step2Kin.cfg
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
CIG-SHORT mailing list
>>>>>>>>>>>>> CIG-SHORT at geodynamics.org
>>>>>>>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
_______________________________________________
>>>>>>>>>>>> CIG-SHORT mailing list
>>>>>>>>>>>> CIG-SHORT at geodynamics.org
>>>>>>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
_______________________________________________
>>>>>>>>>>> CIG-SHORT mailing list CIG-SHORT at geodynamics.org
>>>>>>>>>>>
>>>>>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
_______________________________________________
>>>>>>>>>> CIG-SHORT mailing list CIG-SHORT at geodynamics.org
>>>>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
<step2Kin_stress_strain_ini.png><step2Kin_stressini.png><step1Kin.p
>>>>>>>>> ng
>>>>>>>>>> <
>>>>>>>>> st
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ep2Kin.cfg><step1Kin.cfg>__________________________________________
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
__
>>>>>>>>> __ _ CIG-SHORT mailing list CIG-SHORT at geodynamics.org
>>>>>>>>>
>>>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
Charles A. Williams
>>>>>>>> Scientist GNS Science 1 Fairway Drive, Avalon PO Box
>>>>>>>> 30368 Lower Hutt  5040 New Zealand ph (office):
>>>>>>>> 0064-4570-4566 fax (office): 0064-4570-4600
>>>>>>>> C.Williams at gns.cri.nz
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> CIG-SHORT mailing list CIG-SHORT at geodynamics.org
>>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>>
_______________________________________________
>>>>>>> CIG-SHORT mailing list CIG-SHORT at geodynamics.org
>>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>>
>>>>>>
>>>>>>>
>>>>>>>
Charles A. Williams
>>>>>> Scientist GNS Science 1 Fairway Drive, Avalon PO Box 30368
>>>>>>  Lower Hutt  5040 New Zealand ph (office): 0064-4570-4566
>>>>>> fax (office): 0064-4570-4600 C.Williams at gns.cri.nz
>>>>>>
>>>>>> _______________________________________________ CIG-SHORT
>>>>>> mailing list CIG-SHORT at geodynamics.org
>>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>
>>>>>
>>>>> _______________________________________________ CIG-SHORT
>>>>> mailing list CIG-SHORT at geodynamics.org
>>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>>>
>>>>
>>>> _______________________________________________ CIG-SHORT
>>>> mailing list CIG-SHORT at geodynamics.org
>>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>
>>>
>>> _______________________________________________ CIG-SHORT
>>> mailing list CIG-SHORT at geodynamics.org
>>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>>>
>>
>> _______________________________________________ CIG-SHORT mailing
>> list CIG-SHORT at geodynamics.org
>> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>
>
> _______________________________________________ CIG-SHORT mailing
> list CIG-SHORT at geodynamics.org
> http://geodynamics.org/cgi-bin/mailman/listinfo/cig-short
>



More information about the CIG-SHORT mailing list