Changeset 19388


Ignore:
Timestamp:
06/04/15 04:55:58 (10 years ago)
Author:
cborstad
Message:

NEW: module for handling analytical damage calculation

Location:
issm/trunk-jpl/src/c
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Makefile.am

    r19375 r19388  
    367367if DAMAGEEVOLUTION
    368368issm_sources += ./analyses/DamageEvolutionAnalysis.cpp
     369issm_sources += ./modules/Damagex/Damagex.cpp
    369370endif
    370371if STRESSBALANCE
  • issm/trunk-jpl/src/c/analyses/DamageEvolutionAnalysis.cpp

    r19386 r19388  
    130130        IssmDouble damage,B,n,epseff;
    131131        IssmDouble eps_xx,eps_yy,eps_xy,eps1,eps2,epstmp;
    132         int domaintype,damagelaw;
     132        int domaintype;
    133133
    134134        /*Fetch number of vertices and allocate output*/
     
    140140        element->FindParam(&stress_threshold,DamageStressThresholdEnum);
    141141        element->FindParam(&domaintype,DomainTypeEnum);
    142         element->FindParam(&damagelaw,DamageLawEnum);
    143142
    144143        /*Compute stress tensor: */
     
    202201        IssmDouble J2s,Chi,Psi,PosPsi,NegPsi;
    203202        IssmDouble damage,tau_xx,tau_xy,tau_xz,tau_yy,tau_yz,tau_zz,stressMaxPrincipal;
    204         int equivstress,domaintype,damagelaw,dim;
     203        int equivstress,domaintype,dim;
    205204
    206205        /*Fetch number of vertices and allocate output*/
     
    215214        element->FindParam(&stress_threshold,DamageStressThresholdEnum);
    216215        element->FindParam(&domaintype,DomainTypeEnum);
    217         element->FindParam(&damagelaw,DamageLawEnum);
    218216
    219217        /*Get problem dimension*/
     
    291289                        Psi=Chi-stress_threshold;
    292290                        NegPsi=max(-Chi,0.); /* healing only for compressive stresses */
    293 
    294                         if(damagelaw==1){
    295                                 PosPsi=max(Psi,0.);
    296                                 f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3);
    297                         }
    298                         else if(damagelaw==2){
    299                                 PosPsi=max(Psi,1.);
    300                                 f[i]= c1*(pow(log10(PosPsi),c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3);
    301                         }
    302                         else _error_("damage law not supported");
     291                        PosPsi=max(Psi,0.);
     292                        f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3);
    303293                }
    304294                else{
     
    312302                        Psi=Chi-stress_threshold;
    313303                        NegPsi=max(-Chi,0.); /* healing only for compressive stresses */
    314                         if(damagelaw==1){
    315                                 PosPsi=max(Psi,0.);
    316                                 f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3);
    317                         }
    318                         else if(damagelaw==2){
    319                                 PosPsi=max(Psi,1.);
    320                                 f[i]= c1*(pow(log10(PosPsi),c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3);
    321                         }
    322                         else _error_("damage law not supported");
     304                        PosPsi=max(Psi,0.);
     305                        f[i]= c1*(pow(PosPsi,c2) - healing*pow(NegPsi,c2))*pow((1./(1.-damage)),c3);
    323306                }
    324307        }
     
    534517                        break;
    535518                case 2:
    536                         this->CreateDamageFInputPralong(element);
    537                         break;
    538                 case 3:
    539519                        this->CreateDamageFInputExp(element);
    540520                        break;
  • issm/trunk-jpl/src/c/cores/damage_core.cpp

    r19386 r19388  
    2828
    2929        if(VerboseSolution()) _printf0_("   computing damage\n");
     30        Damagex(femmodel); /* optionally calculate damage analytically first */
    3031        femmodel->SetCurrentConfiguration(DamageEvolutionAnalysisEnum);
    3132        if(stabilization==4){
  • issm/trunk-jpl/src/c/modules/modules.h

    r19047 r19388  
    2020#include "./CreateNodalConstraintsx/CreateNodalConstraintsx.h"
    2121#include "./CreateJacobianMatrixx/CreateJacobianMatrixx.h"
     22#include "./Damagex/Damagex.h"
    2223#include "./DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.h"
    2324#include "./ExpToLevelSetx/ExpToLevelSetx.h"
Note: See TracChangeset for help on using the changeset viewer.