Changeset 2212


Ignore:
Timestamp:
09/11/09 13:18:04 (15 years ago)
Author:
Eric.Larour
Message:

Added a stabilization parameter: constraints_stabilizing, to suppress
zigzagging of thermal penalties, after 5 zigzags. This makes the steady
state runs on Antarctica possible.

Location:
issm/trunk/src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/CreateParameters.cpp

    r1916 r2212  
    166166        parameters->AddObject(param);
    167167
     168        /*stabilize_constraints: */
     169        count++;
     170        param= new Param(count,"stabilize_constraints",INTEGER);
     171        param->SetInteger(iomodel->stabilize_constraints);
     172        parameters->AddObject(param);
     173
    168174        /*stokesreconditioning: */
    169175        count++;
  • issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp

    r1834 r2212  
    4949        int pengrid_active=0;
    5050        int pengrid_thermal_steadystate=1;
     51        int pengrid_stabilize_constraints=0;
    5152
    5253        int numberofpressureloads_stokes;
     
    143144                        pengrid_penalty_offset=iomodel->penalty_offset;
    144145                        pengrid_mparid=iomodel->numberofelements+1;//refers to the corresponding parmat property card
    145 
    146                         pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate);
     146                        pengrid_stabilize_constraints=iomodel->stabilize_constraints;
     147                        pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate,pengrid_stabilize_constraints);
    147148                       
    148149                        loads->AddObject(pengrid);
  • issm/trunk/src/c/ModelProcessorx/IoModel.cpp

    r2211 r2212  
    144144        iomodel->thermalconductivity=0;
    145145        iomodel->min_thermal_constraints=0;
     146        iomodel->stabilize_constraints=0;
    146147        iomodel->mixed_layer_capacity=0;
    147148        iomodel->thermal_exchange_velocity=0;
     
    355356        IoModelFetchData((void**)&iomodel->thermalconductivity,NULL,NULL,iomodel_handle,"thermalconductivity","Scalar",NULL);
    356357        IoModelFetchData((void**)&iomodel->min_thermal_constraints,NULL,NULL,iomodel_handle,"min_thermal_constraints","Integer",NULL);
     358        IoModelFetchData((void**)&iomodel->stabilize_constraints,NULL,NULL,iomodel_handle,"stabilize_constraints","Integer",NULL);
    357359        IoModelFetchData((void**)&iomodel->mixed_layer_capacity,NULL,NULL,iomodel_handle,"mixed_layer_capacity","Scalar",NULL);
    358360        IoModelFetchData((void**)&iomodel->thermal_exchange_velocity,NULL,NULL,iomodel_handle,"thermal_exchange_velocity","Scalar",NULL);
    359 
     361       
    360362        /*qmu: */
    361363        if(iomodel->qmu_analysis){
  • issm/trunk/src/c/ModelProcessorx/IoModel.h

    r2211 r2212  
    140140        double  heatcapacity,thermalconductivity;
    141141        int    min_thermal_constraints;
     142        int    stabilize_constraints;
    142143        double mixed_layer_capacity;
    143144        double thermal_exchange_velocity;
  • issm/trunk/src/c/ModelProcessorx/Melting/CreateLoadsMelting.cpp

    r1905 r2212  
    3838        int pengrid_active=0;
    3939        int pengrid_thermal_steadystate=1;
     40        int pengrid_stabilize_constraints=0;
    4041
    4142        int count;
     
    6566                        pengrid_active=0;
    6667                        pengrid_mparid=iomodel->numberofelements+1;//refers to the corresponding parmat property card
     68                        pengrid_stabilize_constraints=iomodel->stabilize_constraints;
    6769                       
    68                         pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate);
     70                        pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate,pengrid_stabilize_constraints);
    6971                       
    7072                        loads->AddObject(pengrid);
  • issm/trunk/src/c/ModelProcessorx/Thermal/CreateLoadsThermal.cpp

    r1905 r2212  
    3838        int pengrid_active=0;
    3939        int pengrid_thermal_steadystate=1;
     40        int pengrid_stabilize_constraints=0;
    4041
    4142        int numberofsegs_diag_stokes;
     
    6667                        pengrid_penalty_offset=iomodel->penalty_offset;
    6768                        pengrid_active=0;
     69                        pengrid_stabilize_constraints=iomodel->stabilize_constraints;
    6870                       
    69                         pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate);
     71                        pengrid= new Pengrid(pengrid_id, pengrid_node_id,pengrid_mparid,pengrid_dof, pengrid_active, pengrid_penalty_offset,pengrid_thermal_steadystate,pengrid_stabilize_constraints);
    7072                       
    7173                        loads->AddObject(pengrid);
  • issm/trunk/src/c/objects/Pengrid.cpp

    r1901 r2212  
    2222}
    2323
    24 Pengrid::Pengrid(int    pengrid_id, int pengrid_node_id,int pengrid_mparid, int pengrid_dof, int pengrid_active, double pengrid_penalty_offset,int pengrid_thermal_steadystate){
     24Pengrid::Pengrid(int    pengrid_id, int pengrid_node_id,int pengrid_mparid, int pengrid_dof, int pengrid_active, double pengrid_penalty_offset,int pengrid_thermal_steadystate,int pengrid_stabilize_constraints){
    2525       
    2626        id=pengrid_id;
     
    3131        penalty_offset =pengrid_penalty_offset;
    3232        thermal_steadystate=pengrid_thermal_steadystate;
     33        stabilize_constraints=pengrid_stabilize_constraints;
    3334
    3435        node_offset=UNDEF;
     
    3637        matpar=NULL;
    3738        matpar_offset=UNDEF;
     39
     40        zigzag_counter=0;
    3841
    3942        return;
     
    600603        else{
    601604                unstable=1;
     605                if(stabilize_constraints)zigzag_counter++;
     606        }
     607
     608        /*If penalty keeps zigzagging more than 5 times: */
     609        if(stabilize_constraints){
     610                if(zigzag_counter>5){
     611                        unstable=0;
     612                        active=1;
     613                }
    602614        }
    603615
  • issm/trunk/src/c/objects/Pengrid.h

    r803 r2212  
    3030                int   matpar_offset;
    3131
     32                int stabilize_constraints;
     33                int zigzag_counter;
     34
    3235        public:
    3336
    3437                Pengrid();
    35                 Pengrid(int     id, int node_id,int mparid,int dof, int active, double penalty_offset,int thermal_steadystate);
     38                Pengrid(int     id, int node_id,int mparid,int dof, int active, double penalty_offset,int thermal_steadystate,int stabilize_constraints);
    3639                ~Pengrid();
    3740
  • issm/trunk/src/m/classes/@model/model.m

    r2211 r2212  
    110110        md.mixed_layer_capacity=0;
    111111        md.thermal_exchange_velocity=0;
     112        md.min_thermal_constraints=0;
     113        md.stabilize_constraints=0;
    112114       
    113115        %Physical parameters
     
    139141        md.spctemperature=NaN;
    140142        md.spcthickness=NaN;
    141         md.min_thermal_constraints=0;
    142143
    143144        %Observations
  • issm/trunk/src/m/classes/public/display/displaythermal.m

    r1755 r2212  
    1111disp(sprintf('   Thermal solution parameters:'));
    1212
     13disp(sprintf('\n      parameters:'));
     14fielddisplay(md,'stabilize_constraints','stabilize unstable thermal constraints that keep zigzagging (default is 0)');
     15fielddisplay(md,'min_thermal_constraints','threshold to declare convergence of thermal solution (default is 0)');
     16
    1317disp(sprintf('\n      boundary conditions:'));
    1418fielddisplay(md,'spctemperature','constraints flag list (first column) and values (second column)');
  • issm/trunk/src/m/classes/public/marshall.m

    r2211 r2212  
    140140WriteData(fid,md.mixed_layer_capacity,'Scalar','mixed_layer_capacity');
    141141WriteData(fid,md.thermal_exchange_velocity,'Scalar','thermal_exchange_velocity');
     142WriteData(fid,md.stabilize_constraints,'Integer','stabilize_constraints');
    142143
    143144%elements type
  • issm/trunk/src/m/utils/OS/oshostname.m

    r1582 r2212  
    1919        end
    2020        hostname=hostname(1:end-1);
     21        [hostname '|']
    2122end
Note: See TracChangeset for help on using the changeset viewer.