Changeset 26059 for issm/trunk-jpl/src/m/classes/matdamageice.py
- Timestamp:
- 03/09/21 23:52:41 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/matdamageice.py
r25169 r26059 31 31 self.rheology_law = '' 32 32 33 #giaivins: 34 self.lithosphere_shear_modulus = 0. 35 self.lithosphere_density = 0. 36 self.mantle_shear_modulus = 0. 37 self.mantle_density = 0. 33 #SLC 34 self.earth_density = 5512 # average density of the Earth, (kg / m^3) 38 35 39 #SLR40 self.earth_density = 5512 # average density of the Earth, (kg / m^3)41 36 self.setdefaultparameters() 42 37 #}}} 43 38 44 39 def __repr__(self): # {{{ 40 # TODO: 41 # - Convert all formatting to calls to <string>.format (see any 42 # already converted <class>.__repr__ method for examples) 43 # 45 44 string = " Materials:" 46 45 string = "%s\n%s" % (string, fielddisplay(self, "rho_ice", "ice density [kg / m^3]")) … … 60 59 string = "%s\n%s" % (string, fielddisplay(self, "rheology_n", "Glen's flow law exponent")) 61 60 string = "%s\n%s" % (string, fielddisplay(self, "rheology_law", "law for the temperature dependance of the rheology: 'None', 'BuddJacka', 'Cuffey', 'CuffeyTemperate', 'Paterson', 'Arrhenius' or 'LliboutryDuval'")) 62 string = "%s\n%s" % (string, fielddisplay(self, "lithosphere_shear_modulus", "Lithosphere shear modulus [Pa]"))63 string = "%s\n%s" % (string, fielddisplay(self, "lithosphere_density", "Lithosphere density [g / cm^ - 3]"))64 string = "%s\n%s" % (string, fielddisplay(self, "mantle_shear_modulus", "Mantle shear modulus [Pa]"))65 string = "%s\n%s" % (string, fielddisplay(self, "mantle_density", "Mantle density [g / cm^ - 3]"))66 61 string = "%s\n%s" % (string, fielddisplay(self, "earth_density", "Mantle density [kg / m^ - 3]")) 67 62 return string … … 105 100 self.rheology_law = 'Paterson' 106 101 107 # GIA: 108 self.lithosphere_shear_modulus = 6.7e10 # (Pa) 109 self.lithosphere_density = 3.32 # (g / cm^ - 3) 110 self.mantle_shear_modulus = 1.45e11 # (Pa) 111 self.mantle_density = 3.34 # (g / cm^ - 3) 112 113 #SLR 102 #SLC 114 103 self.earth_density = 5512 #average density of the Earth, (kg / m^3) 115 104 return self … … 130 119 md = checkfield(md, 'fieldname', 'materials.mantle_density', '>', 0, 'numel', [1]) 131 120 md = checkfield(md, 'fieldname', 'materials.earth_density', '>', 0, 'numel', [1]) 132 133 if 'GiaAnalysis' in analyses:134 md = checkfield(md, 'fieldname', 'materials.lithosphere_shear_modulus', '>', 0, 'numel', 1)135 md = checkfield(md, 'fieldname', 'materials.lithosphere_density', '>', 0, 'numel', 1)136 md = checkfield(md,'fieldname', 'materials.mantle_shear_modulus', '>', 0, 'numel', 1)137 md = checkfield(md,'fieldname', 'materials.mantle_density', '>', 0, 'numel', 1)138 121 139 122 if 'SealevelriseAnalysis' in analyses: … … 161 144 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'rheology_n', 'format', 'DoubleMat', 'mattype', 2) 162 145 WriteData(fid, prefix, 'data', self.rheology_law, 'name', 'md.materials.rheology_law', 'format', 'String') 163 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'lithosphere_shear_modulus', 'format', 'Double')164 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'lithosphere_density', 'format', 'Double', 'scale', 10.**3.)165 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'mantle_shear_modulus', 'format', 'Double')166 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'mantle_density', 'format', 'Double', 'scale', 10.**3.)167 146 WriteData(fid, prefix, 'object', self, 'class', 'materials', 'fieldname', 'earth_density', 'format', 'Double') 168 147
Note:
See TracChangeset
for help on using the changeset viewer.