Ignore:
Timestamp:
09/08/11 10:57:56 (14 years ago)
Author:
seroussi
Message:

added initialization class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk/test/NightlyRun/test1302.m

    r9664 r9684  
    1414pos1=find(md.elementonbed);     md.thermal.spctemperature(md.elements(pos1,1:3))=10;
    1515pos2=find(md.elementonsurface); md.thermal.spctemperature(md.elements(pos2,4:6))=0;
    16 md.vz=0.1*ones(md.numberofnodes,1);
    17 md.vel=sqrt( md.vx.^2+ md.vy.^2+ md.vz.^2);
    18 md.pressure=zeros(md.numberofnodes,1);
     16md.initialization.vz=0.1*ones(md.numberofnodes,1);
     17md.initialization.vel=sqrt( md.initialization.vx.^2+ md.initialization.vy.^2+ md.initialization.vz.^2);
     18md.initialization.pressure=zeros(md.numberofnodes,1);
    1919
    2020%analytical results
     
    2323A=10/(exp(alpha*(-1000))-1);    %A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
    2424B=-A;
    25 md.temperature=A*exp(alpha*md.z)+B;
     25md.initialization.temperature=A*exp(alpha*md.z)+B;
    2626
    2727%modeled  results
     
    3232comp_temp=zeros(md.numberofnodes,1);
    3333comp_temp(md.results.ThermalSolution.Temperature.index)=md.results.ThermalSolution.Temperature.value;
    34 relative=abs((comp_temp-md.temperature)./md.temperature)*100;
    35 relative(find(comp_temp==md.temperature))=0;
     34relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
     35relative(find(comp_temp==md.initialization.temperature))=0;
    3636plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data','temperature','view',3,...
    37         'title','Analytical temperature [K]','view',3,'data',comp_temp-md.temperature,...
     37        'title','Analytical temperature [K]','view',3,'data',comp_temp-md.initialization.temperature,...
    3838        'title','Absolute error [K]','view',3,'data',relative,'title','Relative error [%]','view',3,...
    3939        'figposition','mathieu','FontSize#all',20)
Note: See TracChangeset for help on using the changeset viewer.