Changeset 302
- Timestamp:
- 05/07/09 12:11:37 (16 years ago)
- Location:
- issm/trunk/src/m/solutions/cielo
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/solutions/cielo/CreateFemModel.m
r202 r302 8 8 function m=CreateFEMModel(md) 9 9 10 disp (sprintf('\n reading data from model %s...',md.name));10 displaystring(md.debug,'\n reading data from model %s...',md.name); 11 11 [m.elements,m.nodes,m.constraints,m.loads,m.materials,parameters]=ModelProcessor(md); 12 12 13 disp (' generating degrees of freedom...');13 displaystring(md.debug,'%s',' generating degrees of freedom...'); 14 14 [m.nodes,m.part,m.tpart]=Dof(m.elements,m.nodes,parameters); 15 15 16 disp (' generating single point constraints...');16 displaystring(md.debug,'%s',' generating single point constraints...'); 17 17 [m.nodes,m.yg]=SpcNodes(m.nodes,m.constraints); 18 18 19 disp (' generating rigid body constraints...');19 displaystring(md.debug,'%s',' generating rigid body constraints...'); 20 20 [m.Rmg,m.nodes]=MpcNodes(m.nodes,m.constraints); 21 21 22 disp (' generating node sets...');22 displaystring(md.debug,'%s',' generating node sets...'); 23 23 m.nodesets=BuildNodeSets(m.nodes); 24 24 25 disp (' reducing single point constraints vector...');25 displaystring(md.debug,'%s',' reducing single point constraints vector...'); 26 26 [m.ys m.ys0]=Reducevectorgtos(m.yg,m.nodesets); 27 27 28 disp (' normalizing rigid body constraints matrix...');28 displaystring(md.debug,'%s',' normalizing rigid body constraints matrix...'); 29 29 m.Gmn = NormalizeConstraints(m.Rmg,m.nodesets); 30 30 31 disp (' configuring element and loads...');31 displaystring(md.debug,'%s',' configuring element and loads...'); 32 32 [m.elements,m.loads,m.nodes] = ConfigureObjects( m.elements, m.loads, m.nodes, m.materials); 33 33 34 disp (' processing parameters...');34 displaystring(md.debug,'%s',' processing parameters...'); 35 35 parameters= ProcessParams(parameters,m.part); 36 36 37 disp (' creating parameters in matlab workspace...');37 displaystring(md.debug,'%s',' creating parameters in matlab workspace...'); 38 38 m.parameters= ParamsToWorkspace(parameters); 39 39 -
issm/trunk/src/m/solutions/cielo/diagnostic.m
r276 r302 1 function md=diagnostic(md) 2 %DIAGNOSTIC - diagnostic solution sequence 3 % 1 function md=diagnostic_proto(md); 2 %DIAGNOSTIC - compute the velocity field of a model 4 3 % Usage: 5 4 % md=diagnostic(md) 5 % 6 6 7 7 %timing … … 9 9 10 10 %Build all models requested for diagnostic simulation 11 displaystring(md.debug,'%s',['reading diagnostic horiz model data']); 11 12 md.analysis_type='diagnostic_horiz'; m_dh=CreateFemModel(md); 13 14 displaystring(md.debug,'\n%s',['reading diagnostic vert model data']); 15 md.analysis_type='diagnostic_vert'; m_dv=CreateFemModel(md); 16 17 displaystring(md.debug,'\n%s',['reading diagnostic stokes model data']); 18 md.analysis_type='diagnostic_stokes'; m_ds=CreateFemModel(md); 12 19 13 if strcmpi(md.type,'3d'), 14 md.analysis_type='diagnostic_vert'; m_dv=CreateFemModel(md); 15 end 16 20 displaystring(md.debug,'\n%s',['reading diagnostic hutter model data']); 21 md.analysis_type='diagnostic_hutter'; m_dhu=CreateFemModel(md); 22 23 displaystring(md.debug,'\n%s',['reading surface and bed slope computation model data']); 24 md.analysis_type='surface_slope_compute'; m_ss=CreateFemModel(md); 25 md.analysis_type='bed_slope_compute'; m_bs=CreateFemModel(md); 26 17 27 % figure out number of dof: just for information purposes. 18 28 md.dof=m_dh.nodesets.fsize; %biggest dof number … … 22 32 inputs=add(inputs,'velocity',m_dh.parameters.u_g,'doublevec',3,m_dh.parameters.numberofnodes); 23 33 24 % Get horizontal solution.25 disp(sprintf('\n%s',['computing horizontal velocities...']));34 %compute solution 35 [u_g,p_g]=diagnostic_core(m_dh,m_dhu,m_dv,m_ds,m_ss,m_bs,inputs); 26 36 27 u_g=diagnostic_core_nonlinear(m_dh,inputs); 37 %Load results onto model 38 md=loadresults(md,u_g,p_g,m_dh,m_ds,m_dhu); 28 39 29 if strcmpi(md.type,'3d'), 30 31 %extrude velocities for collapsed penta elements 32 disp(sprintf('\n%s',['extruding horizontal velocities...'])); 33 u_g=VelocityExtrude(m_dh.elements,m_dh.nodes,m_dh.loads,m_dh.materials,u_g); 34 35 disp(sprintf('\n%s',['computing vertical velocities...'])); 36 37 inputs=add(inputs,'velocity',u_g,'doublevec',m_dh.parameters.numberofdofspernode,m_dh.parameters.numberofnodes); 38 39 u_g_vert=diagnostic_core_linear(m_dv,inputs); 40 41 %load results onto model: 42 md.vx=u_g(1:2:end)*md.yts; 43 md.vy=u_g(2:2:end)*md.yts; 44 md.vz=u_g_vert*md.yts; 45 md.vel=sqrt(md.vx.^2+md.vy.^2+md.vz.^2); 46 47 %Computation of pressure with Pattyn's assumptions (P=rho_ice*g*(s-z) in Pa) 48 md.pressure=md.rho_ice*md.g*(md.surface-md.z); 49 else 50 %load results onto model 51 md.vx=u_g(1:2:end)*md.yts; 52 md.vy=u_g(2:2:end)*md.yts; 53 md.vz=zeros(md.numberofgrids,1); 54 md.vel=sqrt(md.vx.^2+md.vy.^2+md.vz.^2); 55 56 %Computation of pressure with Pattyn's assumptions (P=rho_ice*g*(s-z) in Pa) 57 md.pressure=md.rho_ice*md.g*(md.thickness); 58 end 59 60 %timing 40 %stop timing 61 41 t2=clock; 62 disp (sprintf('\n%s\n',[' solution converged in ' num2str(etime(t2,t1)) ' seconds']));42 displaystring(md.debug,'\n%s\n',['solution converged in ' num2str(etime(t2,t1)) ' seconds']); -
issm/trunk/src/m/solutions/cielo/diagnostic_core_nonlinear.m
r253 r302 1 function [u_g varargout]=diagnostic_core_nonlinear(m,inputs )1 function [u_g varargout]=diagnostic_core_nonlinear(m,inputs,analysis_type) 2 2 %INPUT function [ru_g varargout]=cielodiagnostic_core_nonlinear(m,inputs) 3 3
Note:
See TracChangeset
for help on using the changeset viewer.