Changeset 11299


Ignore:
Timestamp:
02/02/12 07:45:03 (13 years ago)
Author:
seroussi
Message:

added non linearity in enthalpy solution

Location:
issm/trunk-jpl/src
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/c/objects/Elements/Penta.cpp

    r11292 r11299  
    20502050                                name==InversionVzObsEnum ||
    20512051                                name==TemperatureEnum ||
     2052                                name==EnthalpyEnum ||
     2053                                name==EnthalpyPicardEnum ||
    20522054                                name==WaterfractionEnum||
    20532055                                name==FrictionCoefficientEnum ||
     
    32413243        this->parameters->FindParam(&stabilization,ThermalStabilizationEnum);
    32423244        Input* pressure_input=inputs->GetInput(PressureEnum);      _assert_(pressure_input);
    3243         Input* enthalpy_input=inputs->GetInput(EnthalpyEnum);      _assert_(enthalpy_input);
     3245        Input* enthalpy_input=inputs->GetInput(EnthalpyPicardEnum);_assert_(enthalpy_input); //for this iteration of the step
    32443246        Input* vx_input=inputs->GetInput(VxEnum);                  _assert_(vx_input);
    32453247        Input* vy_input=inputs->GetInput(VyEnum);                  _assert_(vy_input);
     
    42394241        const int    numdof=NDOF1*NUMVERTICES;
    42404242
    4241         bool   converged;
     4243        bool   converged=false;
    42424244        int    i,rheology_law;
    42434245        double xyz_list[NUMVERTICES][3];
     
    42664268        Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
    42674269       
    4268 
    4269 //      this->inputs->GetInputValue(&converged,ConvergedEnum);
    4270 //      if(converged){
     4270        this->inputs->GetInputValue(&converged,ConvergedEnum);
     4271        if(converged){
    42714272                /*Convert enthalpy into temperature and water fraction*/
    42724273                for(i=0;i<numdof;i++) matpar->EnthalpyToThermal(&temperatures[i],&waterfraction[i],values[i],pressure[i]);
     
    43004301
    43014302                }
    4302 //      }
    4303 //      else{
    4304 //              this->inputs->AddInput(new PentaP1Input(EnthalpyPicardEnum,values));
    4305 //      }
     4303        }
     4304        else{
     4305                this->inputs->AddInput(new PentaP1Input(EnthalpyPicardEnum,values));
     4306        }
    43064307
    43074308        /*Free ressources:*/
  • TabularUnified issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp

    r11290 r11299  
    420420        }
    421421        else{
     422                printf("-------------- file: Matpar.cpp line: %i\n",__LINE__);
    422423                return 0.1*thermalconductivity/(rho_ice*heatcapacity);
    423424        }
  • TabularUnified issm/trunk-jpl/src/c/solutions/enthalpy_core.cpp

    r9761 r11299  
    4646
    4747                /*call enthalpy_core_step: */
    48                 femmodel->SetCurrentConfiguration(EnthalpyAnalysisEnum);
    49                 solver_linear(femmodel);
     48                enthalpy_core_step(femmodel,i,time);
    5049
    5150                if(solution_type==EnthalpySolutionEnum && !control_analysis){
  • TabularUnified issm/trunk-jpl/src/c/solutions/enthalpy_core_step.cpp

    r11288 r11299  
    2121        solver_nonlinear(femmodel,modify_loads);
    2222
    23         /*transfer water column thickness to old water column thickness: */
    24         //InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum,EnthalpyOldEnum);
     23        /*transfer enthalpy to enthalpy picard for the next step: */
     24        InputDuplicatex(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,EnthalpyEnum,EnthalpyPicardEnum);
    2525
    2626}
  • TabularUnified issm/trunk-jpl/src/m/solutions/enthalpy_core.m

    r11279 r11299  
    44%   Usage:
    55%      femmodel=enthalpy_core(femmodel)
    6 
    76
    87        %recover parameters common to all solutions
     
    2524                time=(i+1)*dt;
    2625
    27                 issmprintf(VerboseSolution,'\n%s',['   computing enthalpy']);
    28                 femmodel=SetCurrentConfiguration(femmodel,EnthalpyAnalysisEnum);
    29                 femmodel=solver_linear(femmodel);
     26                femmodel=enthalpy_core_step(femmodel,i,time);
    3027
    3128                if (solution_type==EnthalpySolutionEnum & ~control_analysis),
  • TabularUnified issm/trunk-jpl/src/m/solvers/solver_nonlinear.m

    r10441 r11299  
    2222
    2323        %Update the solution to make sure that vx and vxold are similar
     24        [femmodel.elements loads]=InputUpdateFromConstant(femmodel.elements,femmodel.nodes,femmodel.vertices,loads,femmodel.materials,femmodel.parameters,double(converged),ConvergedEnum);
    2425        [femmodel.elements,femmodel.materials]=InputUpdateFromSolution(femmodel.elements,femmodel.nodes,femmodel.vertices,loads,femmodel.materials,femmodel.parameters,ug);
    2526
     
    3839                ug= Mergesolutionfromftog( uf, ys, femmodel.nodes,femmodel.parameters);
    3940
    40                 [femmodel.elements,femmodel.materials]=InputUpdateFromSolution(femmodel.elements,femmodel.nodes,femmodel.vertices,loads,femmodel.materials,femmodel.parameters,ug);
    41                 [loads,constraints_converged,num_unstable_constraints] =ConstraintsState( femmodel.elements,femmodel.nodes,femmodel.vertices,loads, femmodel.materials,femmodel.parameters);
    42 
    43                 issmprintf(VerboseConvergence(),'%s%i','      number of unstable constraints: ',num_unstable_constraints);
    44 
    4541                %Figure out if convergence have been reached
    4642                converged=convergence(K_ff,p_f,uf,old_uf,femmodel.parameters);
     
    4844                %add convergence status into  status
    4945                [femmodel.elements loads]=InputUpdateFromConstant(femmodel.elements,femmodel.nodes,femmodel.vertices,loads,femmodel.materials,femmodel.parameters,double(converged),ConvergedEnum);
     46
     47                [femmodel.elements,femmodel.materials]=InputUpdateFromSolution(femmodel.elements,femmodel.nodes,femmodel.vertices,loads,femmodel.materials,femmodel.parameters,ug);
     48                [loads,constraints_converged,num_unstable_constraints] =ConstraintsState( femmodel.elements,femmodel.nodes,femmodel.vertices,loads, femmodel.materials,femmodel.parameters);
     49
     50                issmprintf(VerboseConvergence(),'%s%i','      number of unstable constraints: ',num_unstable_constraints);
    5051
    5152                %rift convergence
Note: See TracChangeset for help on using the changeset viewer.