Issue with non-linear rheology

I am running into issues when I try to change the volume’s rheology to something non-linear (i.e. Drucker-Prager plasticity or powerlaw viscoelasticity). I have included all of the spatialdb files from examples 8 and 9 in examples/3d/hex8 so the required information should be in the appropriate directory. I run into similar configuration errors with both rheologies, and the error seems to be related to not finding some required component to determine the rheology. The error output using a powerlaw rheology is included:
For reference, the code runs well with elastic and viscoelastic constitutive laws.

rheology absrp$ pylith powerlaw_spontaneous.cfg

./pylithapp.cfg:55:

– pyre.inventory(error)

– pylithapp.timedependent.materials.powerlaw3d.compositedb.iohandler.filename ← ‘spatialdb/mat_elastic.spatialdb’

– unknown component ‘pylithapp.timedependent.materials.powerlaw3d.compositedb.iohandler’

usage: pylith [–=] [–.=] [FILE.cfg] …

component ‘pylithapp’

properties: dump_parameters, help, help-components, help-persistence, help-properties, include-citations, initialize-only, job, launcher, mesh_generator, nodes, perf_logger, petsc, problem, scheduler, start-python-debugger, typos, weaver

facilities: dump_parameters,job,launcher,mesh_generator,perf_logger,petsc,problem,scheduler,weaver

For more information:

–help-properties: prints details about user settable properties

–help-components: prints details about user settable facilities and components

pylithapp: configuration error(s)

(base) Albas-MacBook-Pro:rheology absrp$

It looks like you are either missing some settings or have conflicting settings in your pylithapp.cfg and powerlaw_spontaneous.cfg files. Please post or email the .cfg files.

Hi Brad,

See the .cfg files attached. Thank you.

Alba powerlaw_spontaneous.cfg (9.6 KB) pylithapp.cfg (2.6 KB)

The problem is the spatial database settings in pylithapp.cfg, which are for an elastic material, are incompatible with the spatial database settings in powerlaw_spontaneous.cfg.

Here is the relevant portion of your current pylithapp.cfg:

[pylithapp.problem.materials.upper_crust]
--omitted lines--
db_properties.label = Properties for upper crust
db_properties.iohandler.filename = spatialdb/mat_elastic.spatialdb

Here is the relevant portion of your current powerlaw_spontaneous.cfg:

[pylithapp.timedependent.materials.upper_crust]
db_properties = spatialdata.spatialdb.CompositeDB
db_properties.db_A = spatialdata.spatialdb.SimpleDB
db_properties.db_B = spatialdata.spatialdb.SimpleDB

--omitted lines--
[pylithapp.timedependent.materials.upper_crust.db_properties]
values_A = [density,vs,vp]   ; Elastic properties.
db_A.label = Elastic properties
db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
values_B = [reference-stress,reference-strain-rate,power-law-exponent]   ; Power-law properties.
db_B.label = Power-law properties
db_B.iohandler.filename = spatialdb/mat_powerlaw.spatialdb
db_B.query_type = linear

The settings in pylithapp.cfg are specific to a SimpleDB spatial database. When you use the CompositeDB, those settings for the SimpleDB generate an error. The most robust solution is to separate your settings into different files based on material. I would further separate your fault settings as well-- one file for prescribed slip and one for spontaneous rupture.

Suggested refactoring of .cfg files for material information

pylithapp.cfg

Parameters that are independent of the type of material. This includes the number of materials, labels, id, and quadrature. It does not include anything about the spatial databases.

[pylithapp.problem]
materials = [upper_crust]

[pylithapp.problem.materials.upper_crust]
label = Upper crust material
id = 300
quadrature.cell = pylith.feassemble.FIATSimplex
quadrature.cell.dimension = 3

mat_elastic.cfg

[pylithapp.problem.materials.upper_crust]
# Here I explicitly specify the database for clarity. The `SimpleDB` is the default, so specifying it is optional.
db_properties = spatialdata.spatialdb.SimpleDB
db_properties.label = Properties for upper crust
db_properties.iohandler.filename = spatialdb/mat_elastic.spatialdb

mat_powerlaw.cfg

[pylithapp.problem.materials]
upper_crust = pylith.materials.PowerLaw3D

[pylithapp.timedependent.materials.upper_crust]
db_properties = spatialdata.spatialdb.CompositeDB
db_properties.db_A = spatialdata.spatialdb.SimpleDB
db_properties.db_B = spatialdata.spatialdb.SimpleDB

# Provide the values to be obtained from each database and the database name.
[pylithapp.timedependent.materials.upper_crust.db_properties]
values_A = [density,vs,vp]   ; Elastic properties.
db_A.label = Elastic properties
db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
values_B = [reference-stress,reference-strain-rate,power-law-exponent]   ; Power-law properties.
db_B.label = Power-law properties
db_B.iohandler.filename = spatialdb/mat_powerlaw.spatialdb
db_B.query_type = linear

# Since there are additional properties and state variables for the power-law model, we explicitly
# request that they be output.
[pylithapp.timedependent.materials.upper_crust]
output.cell_info_fields = [density,mu,lambda,reference_strain_rate,reference_stress,power_law_exponent]
output.cell_data_fields = [total_strain,stress,viscous_strain]

Using the .cfg files

# Running a simulation with the elastic material.
pylith mat_elastic.cfg

# Running a simulation with a powerlaw material
pylith mat_powerlaw.cfg