Changeset 8486


Ignore:
Timestamp:
06/03/11 08:20:04 (14 years ago)
Author:
seroussi
Message:

trunk.m: work on enthalpy

Location:
issm/trunk/src/m
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/version/7.6/model.m

    r8458 r8486  
    122122                 thermalconductivity=0;
    123123                 meltingpoint=0;
     124                 referencetemperature=0; %for enthalpy
    124125                 beta=0;
    125126                 
     
    272273                 basal_melting_rate_correction_apply=0;
    273274                 pressure=NaN;
     275                 waterfraction=NaN;
    274276                 
    275277                 %hydrology
     
    571573                         md.meltingpoint=273.15;
    572574
     575                         %the reference temperature for enthalpy model (cf Aschwanden)
     576                         md.referencetemperature=223.15;
     577
    573578                         %rate of change of melting point with pressure (K/Pa)
    574579                         md.beta=9.8*10^-8;
  • issm/trunk/src/m/classes/version/7.7/model.m

    r8458 r8486  
    122122                 thermalconductivity=0;
    123123                 meltingpoint=0;
     124                 referencetemperature=0; %for enthalpy
    124125                 beta=0;
    125126                 
     
    267268                 vel=NaN;
    268269                 temperature=NaN; %temperature solution vector
     270                 waterfraction=NaN;
    269271                 gl_melting_rate=NaN;
    270272                 basal_melting_rate=NaN;
     
    643645                         md.meltingpoint=273.15;
    644646
     647                         %the reference temperature for enthalpy model (cf Aschwanden)
     648                         md.referencetemperature=223.15;
     649
    645650                         %rate of change of melting point with pressure (K/Pa)
    646651                         md.beta=9.8*10^-8;
  • issm/trunk/src/m/model/extrude.m

    r8407 r8486  
    170170if ~isnan(md.vel),md.vel=project3d(md,md.vel,'node');end;
    171171if ~isnan(md.temperature),md.temperature=project3d(md,md.temperature,'node');end;
     172if ~isnan(md.waterfraction),md.waterfraction=project3d(md,md.waterfraction,'node');end;
    172173if ~isnan(md.surface_slopex),md.surface_slopex=project3d(md,md.surface_slopex,'node');end;
    173174if ~isnan(md.surface_slopey),md.surface_slopey=project3d(md,md.surface_slopey,'node');end;
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r8484 r8486  
    510510                                %INITIAL TEMPERATURE, MELTING AND ACCUMULATION
    511511                                fields={'temperature','surface_mass_balance','basal_melting_rate'};
     512                                checksize(md,fields,[md.numberofnodes 1]);
     513                                checknan(md,fields);
     514
     515                                %INITIAL TEMPERATURE
     516                                fields={'temperature','spctemperature(:,2)','observed_temperature'};
     517                                checkgreater(md,fields,0)
     518                        end
     519                        %}}}
     520                case EnthalpyAnalysisEnum,
     521                        % {{{2
     522                        %EXTRUSION
     523                        if (md.dim==2),
     524                                if md.solution_type==TransientSolutionEnum,
     525                                        return;
     526                                else
     527                                        error(['model not consistent: for a ' EnumToString(md.solution_type) ' computation, the model must be 3d, extrude it first!'])
     528                                end
     529                        end
     530
     531                        %CHECK THAT WE ARE NOT FULLY CONSTRAINED
     532                        if isnan(find(~md.spctemperature(:,1))),
     533                                error(['model not consistent: model ' md.name ' is totally constrained for temperature, no need to solve!']);
     534                        end
     535
     536                        %VELOCITIES AND PRESSURE
     537                        fields={'vx','vy','vz','pressure','geothermalflux'};
     538                        checksize(md,fields,[md.numberofnodes 1]);
     539                        checknan(md,fields);
     540
     541                        %THERMAL TRANSIENT
     542                        if md.dt~=0,
     543
     544                                %DT and NDT
     545                                fields={'dt','ndt'};
     546                                checkgreaterstrict(md,fields,0);
     547
     548                                %INITIAL TEMPERATURE, MELTING, ACCUMULATION AND WATERFRACTION
     549                                fields={'temperature','surface_mass_balance','basal_melting_rate','waterfraction'};
    512550                                checksize(md,fields,[md.numberofnodes 1]);
    513551                                checknan(md,fields);
  • issm/trunk/src/m/model/marshall.m

    r8399 r8486  
    6666WriteData(fid,md.pressure,'Mat','pressure');
    6767WriteData(fid,md.temperature,'Mat','temperature');
     68WriteData(fid,md.waterfraction,'Mat','waterfraction');
    6869
    6970
     
    202203WriteData(fid,md.hydro_kn,'Scalar','hydro_kn');
    203204WriteData(fid,md.meltingpoint,'Scalar','meltingpoint');
     205WriteData(fid,md.referencetemperature,'Scalar','referencetemperature');
    204206WriteData(fid,md.latentheat,'Scalar','latentheat');
    205207WriteData(fid,md.heatcapacity,'Scalar','heatcapacity');
Note: See TracChangeset for help on using the changeset viewer.