Changeset 22096
- Timestamp:
- 09/16/17 15:59:41 (8 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 4 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/geometry.py
r21584 r22096 47 47 if (solution=='TransientSolution' and md.transient.isgia) or (solution=='GiaSolution'): 48 48 md = checkfield(md,'fieldname','geometry.thickness','NaN',1,'Inf',1,'>=',0,'timeseries',1) 49 elif solution=='LoveSolution': 50 return 49 51 else: 50 52 md = checkfield(md,'fieldname','geometry.surface' ,'NaN',1,'Inf',1,'size',[md.mesh.numberofvertices]) -
issm/trunk-jpl/src/m/classes/mask.py
r21303 r22096 38 38 #}}} 39 39 def checkconsistency(self,md,solution,analyses): # {{{ 40 if(solution=='LoveSolution'): 41 return 40 42 41 43 md = checkfield(md,'fieldname','mask.ice_levelset' ,'size',[md.mesh.numberofvertices]) -
issm/trunk-jpl/src/m/classes/materials.py
r22004 r22096 7 7 def naturetointeger(strnat): #{{{ 8 8 9 intnat=np. array(len(strnat))9 intnat=np.zeros(len(strnat)) 10 10 for i in range(len(intnat)): 11 11 if strnat[i]=='damageice': … … 181 181 182 182 self.viscosity=[1e21,1e40] #mantle and lithosphere viscosity (respectively) [Pa.s] 183 self.lame_mu=[1.45*1e11,6.7*1 0^10] # (Pa) #lithosphere and mantle shear modulus (respectively) [Pa]183 self.lame_mu=[1.45*1e11,6.7*1e10] # (Pa) #lithosphere and mantle shear modulus (respectively) [Pa] 184 184 self.lame_lambda=self.lame_mu # (Pa) #mantle and lithosphere lamba parameter (respectively) [Pa] 185 self.burgers_viscosity=[ NaN,NaN]186 self.burgers_mu=[ NaN,NaN]185 self.burgers_viscosity=[np.nan,np.nan] 186 self.burgers_mu=[np.nan,np.nan] 187 187 self.isburgers=[0,0] 188 188 self.density=[5.51*1e3,5.50*1e3] # (Pa) #mantle and lithosphere density [kg/m^3] … … 228 228 229 229 for i in range(md.materials.numlayers-1): 230 if md.materials.issolid[i] and md.materials.issolid[i+1]: #if there are at least two consecutive indices that contain issolid = 0231 raise RuntimeError("%s%i%s"%('2 or more adjacent fluid layers detected starting at layer ',i,'This is not supported yet. Consider merging them.'))230 if (not md.materials.issolid[i]) and (not md.materials.issolid[i+1]): #if there are at least two consecutive indices that contain issolid = 0 231 raise RuntimeError("%s%i%s"%('2 or more adjacent fluid layers detected starting at layer ',i,'. This is not supported yet. Consider merging them.')) 232 232 233 233 else: … … 237 237 # }}} 238 238 def marshall(self,prefix,md,fid): # {{{ 239 239 240 240 #1: MatdamageiceEnum 2: MatestarEnum 3: MaticeEnum 4: MatenhancediceEnum 5: MaterialsEnum 241 241 WriteData(fid,prefix,'name','md.materials.type','data',6,'format','Integer') -
issm/trunk-jpl/src/m/classes/mesh2d.py
r21575 r22096 82 82 #}}} 83 83 def checkconsistency(self,md,solution,analyses): # {{{ 84 if(solution=='LoveSolution'): 85 return 84 86 85 87 md = checkfield(md,'fieldname','mesh.x','NaN',1,'Inf',1,'size',[md.mesh.numberofvertices]) -
issm/trunk-jpl/test/NightlyRun/test2084.py
r22062 r22096 1 2 #Test Name: GiaCaron. Forward Love number solution for a viscoelastic earth, model M3-L70-V01 from Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M., Martinec, Z., Gasperini, P., Lund, B., Wolf, D., Vermeersen, L. L. A. and King, M. A. (2011), A benchmark study for glacial isostatic adjustment codes. Geophysical Journal International, 185: 106–132. doi:10.1111/j.1365-246X.2011.04952.x 1 #Test Name: GiaCaron. Forward Love number solution for a viscoelastic earth, 2 # model M3-L70-V01 from Spada, G., Barletta, V. R., Klemann, V., Riva, R. E. M., 3 # Martinec, Z., Gasperini, P., Lund, B., Wolf, D., Vermeersen, L. L. A. 4 # and King, M. A. (2011), A benchmark study for glacial isostatic 5 # adjustment codes. Geophysical Journal International, 6 # 185: 106-132. doi:10.1111/j.1365-246X.2011.04952.x 7 3 8 from model import * 4 9 from socket import gethostname 5 10 from solve import * 6 from numpy import * 11 from numpy import * 12 from generic import generic 13 from materials import * 14 7 15 md=model() 8 md.cluster=generic('name',oshostname(),'np',1) 16 md.cluster=generic('name',gethostname(),'np',1) 17 9 18 md.materials=materials('litho') 10 19 md.miscellaneous.name='FourierLoveTest' 20 11 21 md.verbose=verbose('111111101') 12 22 cst=365.25*24*3600*1000 23 13 24 md.materials.numlayers=6 14 md.materials.radius =[10, 1222.5, 3.4800e+03,5.7010e+03,5.9510e+03,6.3010e+03,6.3710e+03]*1e3 15 md.materials.density=[1.0750e4, 1.0750e+04,4.9780e+03,3.8710e+03,3.4380e+03,3.0370e+03] 16 md.materials.lame_mu=[1e-5,0,2.2834e+00,1.0549e+00,7.0363e-01,5.0605e-01]*1e11 17 md.materials.viscosity=[0,0,2.0000e+00,1.0000e+00,1.0000e+00,1.0000e+25]*1e21 18 md.materials.lame_lambda=md.materials.lame_mu*0+5e14 19 md.materials.issolid=[1, 0, 1, 1, 1, 1] 20 md.materials.isburgers=zeros(md.materials.numlayers,1) 25 md.materials.radius=np.array([10,1222.5,3.4800e+03,5.7010e+03,5.9510e+03, 26 6.3010e+03,6.3710e+03]).reshape(-1,1)*1e3 27 md.materials.density=np.array([1.0750e4,1.0750e+04,4.9780e+03,3.8710e+03, 28 3.4380e+03,3.0370e+03]).reshape(-1,1) 29 md.materials.lame_mu=np.array([1e-5,0,2.2834e+00,1.0549e+00,7.0363e-01, 30 5.0605e-01]).reshape(-1,1)*1e11 31 md.materials.viscosity=np.array([0,0,2.0000e+00,1.0000e+00,1.0000e+00, 32 1.0000e+25]).reshape(-1,1)*1e21 33 md.materials.lame_lambda=np.array(md.materials.lame_mu)*0+5e14 34 md.materials.issolid=np.array([1,0,1,1,1,1]).reshape(-1,1) 35 md.materials.isburgers=np.zeros((md.materials.numlayers,1)) 36 21 37 md.love.allow_layer_deletion=1 22 23 md.love.frequencies=([0]*2*pi)/cst 38 md.love.frequencies=(np.array([0])*2*pi).reshape(-1,1)/cst 39 md.love.nfreq=len(md.love.frequencies) 40 md.love.sh_nmax=256 41 42 md.materials.burgers_mu=md.materials.lame_mu 43 md.materials.burgers_viscosity=md.materials.viscosity 44 45 md=solve(md,'lv') 46 47 48 49 #Fields and tolerances to track changes 50 #loading love numbers 51 field_names=['LoveHe','LoveKe','LoveLe'] 52 field_tolerances=[3.2e-9,3.2e-9,3.2e-9] 53 field_values=[ 54 np.array(md.results.LoveSolution.LoveHr)[:,0], 55 np.array(md.results.LoveSolution.LoveKr)[:,0], 56 np.array(md.results.LoveSolution.LoveLr)[:,0] 57 ] 58 59 md.love.frequencies=(np.array([1e-3,1e-2,1e-1,1,-1e-3,-1e-2,-1e-1, 60 -1])*2*pi).reshape(-1,1)/cst 24 61 md.love.nfreq=len(md.love.frequencies) 25 62 md.love.sh_nmax=256 26 63 md.materials.burgers_mu=md.materials.lame_mu 27 64 md.materials.burgers_viscosity=md.materials.viscosity 28 md=solve(md,'lv') 65 66 md=solve(md,'lv') 67 68 69 29 70 #Fields and tolerances to track changes 30 71 #loading love numbers 31 field_names=['LoveHe','LoveKe','LoveLe'] 32 field_tolerances=[1e-13,1e-13,1e-13] 33 field_values=[\ 34 (md.results.LoveSolution.LoveHr[:][0]),\ 35 (md.results.LoveSolution.LoveKr[:][0]),\ 36 (md.results.LoveSolution.LoveLr[:][0]),\ 37 ] 38 39 40 md.love.frequencies=([1e-3, 1e-2, 1e-1, 1, -1e-3, -1e-2, -1e-1, -1]*2*pi)/cst 41 md.love.nfreq=len(md.love.frequencies) 42 md.love.sh_nmax=256 43 md.materials.burgers_mu=md.materials.lame_mu 44 md.materials.burgers_viscosity=md.materials.viscosity 45 md=solve(md,'lv') 46 #Fields and tolerances to track changes 47 #loading love numbers 48 field_names=concatenate([field_names,['LoveHlr','LoveKlr','LoveLlr','LoveHli','LoveKli','LoveLli']]) 49 field_tolerances=concatenate([field_tolerances,[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]]) 50 field_values=concatenate([field_values,[\ 51 (md.results.LoveSolution.LoveHr[:][:]),\ 52 (md.results.LoveSolution.LoveKr[:][:]),\ 53 (md.results.LoveSolution.LoveLr[:][:])),\ 54 (md.results.LoveSolution.LoveHi[:][:]),\ 55 (md.results.LoveSolution.LoveKi[:][:]),\ 56 (md.results.LoveSolution.LoveLi[:][:]),\ 57 ]]) 58 59 72 field_names+=['LoveHlr','LoveKlr','LoveLlr','LoveHli','LoveKli','LoveLli'] 73 field_tolerances+=[3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9] 74 field_values+=[ 75 np.array(md.results.LoveSolution.LoveHr), 76 np.array(md.results.LoveSolution.LoveKr), 77 np.array(md.results.LoveSolution.LoveLr), 78 np.array(md.results.LoveSolution.LoveHi), 79 np.array(md.results.LoveSolution.LoveKi), 80 np.array(md.results.LoveSolution.LoveLi) 81 ] 60 82 61 83 md.love.forcing_type=9 62 84 md.love.sh_nmin=2 63 md.love.frequencies=([0, 1e-4, 1e-3, 1e-2, 1e-1, 1, -1e-4, -1e-3, -1e-2, -1e-1, -1]*2*pi)/cst 64 md.love.nfreq=len(md.love.frequencies) 65 md=solve(md,'lv') 66 #tidal love numbers 67 field_names=concatenate([field_names,['LoveHtr','LoveKtr','LoveLtr','LoveHti','LoveKti','LoveLti']]) 68 field_tolerances=concatenate([field_tolerances,[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]]) 69 field_values=concatenate([field_values,[\ 70 (md.results.LoveSolution.LoveHr[:][0]),\ 71 (md.results.LoveSolution.LoveKr[:][0]),\ 72 (md.results.LoveSolution.LoveLr[:][0]),\ 73 (md.results.LoveSolution.LoveHr[:][1:]),\ 74 (md.results.LoveSolution.LoveKr[:][1:]),\ 75 (md.results.LoveSolution.LoveLr[:][1:]),\ 76 (md.results.LoveSolution.LoveHi[:][1:]),\ 77 (md.results.LoveSolution.LoveKi[:][1:]),\ 78 (md.results.LoveSolution.LoveLi[:][1:]),\ 79 ]]) 85 md.love.frequencies=((np.array([0,1e-3,1e-2,1e-1,1,-1e-3, 86 -1e-2,-1e-1,-1])*2*pi).reshape(-1,1)/cst) 87 md.love.nfreq=len(md.love.frequencies) 88 89 md=solve(md,'lv') 90 91 92 93 #tidal love numbers, check 94 field_names+=['LoveHtr','LoveKtr','LoveLtr','LoveHti','LoveKti','LoveLti'] 95 field_tolerances+=[3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9] 96 field_values+=[ 97 np.array(md.results.LoveSolution.LoveHr)[:,0], 98 np.array(md.results.LoveSolution.LoveKr)[:,0], 99 np.array(md.results.LoveSolution.LoveLr)[:,0], 100 np.array(md.results.LoveSolution.LoveHr)[:,1:], 101 np.array(md.results.LoveSolution.LoveKr)[:,1:], 102 np.array(md.results.LoveSolution.LoveLr)[:,1:], 103 np.array(md.results.LoveSolution.LoveHi)[:,1:], 104 np.array(md.results.LoveSolution.LoveKi)[:,1:], 105 np.array(md.results.LoveSolution.LoveLi)[:,1:] 106 ] 80 107 81 108 … … 120 147 # (md.results.LoveSolution.LoveLi[:][1:]),\ 121 148 # ] 122 #Model VSS96 from Vermeersen, L.L.A., Sabadini, R. & Spada, G., 1996a. Analytical visco-elastic relaxation models, Geophys. Res. Lett., 23, 697–700. 123 md.materials.radius=[10, 1222.5, 3480., 3600., 3630.5, 3700., 3900., 4000., 4200., 4300., 4500., 4600., 4800., 4900., 5100., 5200., 5400., 5500., 5600.5, 5650., 5701., 5736., 5771.5, 5821., 5951., 5970.5, 6016., 6061., 6150.5, 6151.5, 6251., 6371.]*1e3 124 md.materials.lame_mu=[1e-5, 0., 2.933, 2.8990002, 2.8550003, 2.7340002, 2.675, 2.559, 2.502, 2.388, 2.331, 2.215, 2.157, 2.039, 1.979, 1.8560001, 1.794, 1.73, 1.639, 1.2390001, 1.224, 1.21, 1.128, 0.97700006, 0.906, 0.79, 0.773, 0.741, 0.656, 0.665, 0.602]*1e11 125 md.materials.density=[10925., 10925., 5506.42, 5491.45, 5456.57, 5357.06, 5307.24, 5207.13, 5156.69, 5054.69, 5002.99, 4897.83, 4844.22, 4734.6, 4678.44, 4563.07, 4503.72, 4443.16, 4412.41, 3992.14, 3983.99, 3975.84, 3912.82, 3786.78, 3723.78, 3516.39, 3489.51, 3435.78, 3359.5, 3367.1, 3184.3] 126 md.materials.viscosity=[0., 0., 8E+21, 8.5E+21, 9E+21, 3.E+22, 4.E+22, 5E+22, 6.E+22, 5E+22, 4.5E+22, 3.E+22, 2.5E+22, 1.8E+22, 1.3E+22, 8E+21, 7E+21, 6.5E+21, 6.E+21, 5.5E+21, 5.E+21, 55E+21, 45E+21, 2.5E+21, 27E+21, 1.5E+21, 10E+20, 6.E+20, 5.5E+20, 2.E+20, 1.E40] 127 md.materials.lame_lambda=md.materials.lame_mu*0+5e14 128 md.materials.issolid=ones(len(md.materials.mu)) 149 #Model VSS96 from Vermeersen, L.L.A., Sabadini, R. & Spada, G., 1996a. Analytical visco-elastic relaxation models, Geophys. Res. Lett., 23, 697-700. 150 151 md.materials.radius=np.array([10,1222.5,3480.,3600.,3630.5,3700.,3900.,4000., 152 4200.,4300.,4500.,4600.,4800.,4900.,5100.,5200., 153 5400.,5500.,5600.5,5650.,5701.,5736.,5771.5, 154 5821.,5951.,5970.5,6016.,6061.,6150.5,6151.5, 155 6251.,6371.]).reshape(-1,1)*1e3 156 md.materials.lame_mu=np.array([1e-5,0.,2.933,2.8990002,2.8550003,2.7340002,2.675, 157 2.559,2.502,2.388,2.331,2.215,2.157,2.039,1.979, 158 1.8560001,1.794,1.73,1.639,1.2390001,1.224,1.21, 159 1.128,0.97700006,0.906,0.79,0.773,0.741,0.656,0.665, 160 0.602]).reshape(-1,1)*1e11 161 md.materials.density=np.array([10925.,10925.,5506.42,5491.45,5456.57,5357.06, 162 5307.24,5207.13,5156.69,5054.69,5002.99,4897.83, 163 4844.22,4734.6,4678.44,4563.07,4503.72,4443.16, 164 4412.41,3992.14,3983.99,3975.84,3912.82,3786.78, 165 3723.78,3516.39,3489.51,3435.78,3359.5,3367.1, 166 3184.3]).reshape(-1,1) 167 md.materials.viscosity=np.array([0.,0.,7.999999999999999E+21,8.5E+21, 168 8.999999999999999E+21,3.E+22,4.E+22, 169 5.0000000000000004E+22,6.E+22, 170 5.0000000000000004E+22,4.5E+22,3.E+22, 171 2.5000000000000002E+22,1.7999999999999998E+22, 172 1.3E+22,7.999999999999999E+21,6.999999999999999E+21, 173 6.5E+21,6.E+21,5.5E+21,5.E+21,4.4999999999999995E+21, 174 3.9999999999999995E+21,2.5E+21, 175 1.9999999999999997E+21,1.5E+21,9.999999999999999E+20, 176 6.E+20,5.5000000000000007E+20,2.E+20, 177 1.E40]).reshape(-1,1) 178 md.materials.lame_lambda=np.array(md.materials.lame_mu)*0+5e14 179 md.materials.issolid=np.ones(len(md.materials.lame_mu)).reshape(-1,1) 129 180 md.materials.issolid[1]=0 130 181 md.materials.numlayers=len(md.materials.lame_mu) … … 135 186 md.love.sh_nmin=1 136 187 md.love.sh_nmax=100 137 md=solve(md,'lv') 138 md.love.frequencies=([0, 1e-4, 1e-2, 1, -1e-4, -1e-2, -1]*2*pi)/cst 139 md.love.nfreq=len(md.love.frequencies) 140 field_names=concatenate([field_names,['LoveHmr','LoveKmr','LoveLmr','LoveHmi','LoveKmi','LoveLmi']]) 141 field_tolerances=concatenate([field_tolerances,[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]]) 142 field_values=concatenate([field_values,[\ 143 (md.results.LoveSolution.LoveHr[:][0]),\ 144 (md.results.LoveSolution.LoveKr[:][0]),\ 145 (md.results.LoveSolution.LoveLr[:][0]),\ 146 (md.results.LoveSolution.LoveHr[:][1:]),\ 147 (md.results.LoveSolution.LoveKr[:][1:]),\ 148 (md.results.LoveSolution.LoveLr[:][1:]),\ 149 (md.results.LoveSolution.LoveHi[:][1:]),\ 150 (md.results.LoveSolution.LoveKi[:][1:]),\ 151 (md.results.LoveSolution.LoveLi[:][1:]),\ 152 ]]) 188 189 md=solve(md,'lv') 190 191 192 193 md.love.frequencies=(np.array([0,1e-3,1e-2,1,-1e-3,-1e-2, 194 -1])*2*pi).reshape(-1,1)/cst 195 md.love.nfreq=len(md.love.frequencies) 196 197 field_names+=['LoveHmr','LoveKmr','LoveLmr','LoveHmi','LoveKmi','LoveLmi'] 198 field_tolerances+=[3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9,3.2e-9] 199 field_values+=[ 200 np.array(md.results.LoveSolution.LoveHr)[:,0], 201 np.array(md.results.LoveSolution.LoveKr)[:,0], 202 np.array(md.results.LoveSolution.LoveLr)[:,0], 203 np.array(md.results.LoveSolution.LoveHr)[:,1:], 204 np.array(md.results.LoveSolution.LoveKr)[:,1:], 205 np.array(md.results.LoveSolution.LoveLr)[:,1:], 206 np.array(md.results.LoveSolution.LoveHi)[:,1:], 207 np.array(md.results.LoveSolution.LoveKi)[:,1:], 208 np.array(md.results.LoveSolution.LoveLi)[:,1:] 209 ]
Note:
See TracChangeset
for help on using the changeset viewer.