Changeset 6268


Ignore:
Timestamp:
10/12/10 15:05:50 (14 years ago)
Author:
seroussi
Message:

added GetStabilizationParameter routine

Location:
issm/trunk/src/c/objects/Elements
Files:
2 edited

Legend:

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

    r6260 r6268  
    29182918        double     heatcapacity,thermalconductivity,dt;
    29192919        double     scalar_artdiff;
    2920         double     tau_parameter,diameter,normu;
     2920        double     tau_parameter,diameter;
    29212921        double     xyz_list[NUMVERTICES][3];
    29222922        double     B[3][numdof];
     
    30383038                        GetNodalFunctionsP1Derivatives(&dh1dh6[0][0],&xyz_list[0][0], gauss);
    30393039
    3040                         normu=pow(pow(u,2)+pow(v,2)+pow(w,2),0.5);
    3041                         if(normu*diameter/(3*2*thermalconductivity/(rho_ice*heatcapacity))<1){
    3042                                 tau_parameter=pow(diameter,2)/(3*2*2*thermalconductivity/(rho_ice*heatcapacity));
    3043                         }
    3044                         else tau_parameter=diameter/(2*normu);
     3040                        tau_parameter=GetStabilizationParameter(u,v,w,diameter,rho_ice,heatcapacity,thermalconductivity);
     3041                        //if(dt) scalar_artdiff=scalar_artdiff*dt;
     3042
    30453043                        scalar_artdiff=tau_parameter*gauss->weight*Jdet;
    3046 
    30473044                        for(i=0;i<numdof;i++){
    30483045                                for(j=0;j<numdof;j++){
     
    38303827        double thermalconductivity;
    38313828        double viscosity,temperature;
    3832         double tau_parameter,diameter,normu;
     3829        double tau_parameter,diameter;
    38333830        double u,v,w,scalar_artdiff;
    38343831        double scalar_def,scalar_transient;
     
    38903887                        vz_input->GetParameterValue(&w, gauss);
    38913888
    3892                         normu=pow(pow(u,2)+pow(v,2)+pow(w,2),0.5);
    3893                         if(normu*diameter/(3*2*thermalconductivity/(rho_ice*heatcapacity))<1){
    3894                                 tau_parameter=pow(diameter,2)/(3*2*2*thermalconductivity/(rho_ice*heatcapacity));
    3895                         }
    3896                         else tau_parameter=diameter/(2*normu);
    3897 
     3889                        tau_parameter=GetStabilizationParameter(u,v,w,diameter,rho_ice,heatcapacity,thermalconductivity);
    38983890                        scalar_artdiff=tau_parameter*gauss->weight*Jdet*phi/(rho_ice*heatcapacity);
     3891                        //if(dt) scalar_artdiff=scalar_artdiff*dt;
     3892
    38993893                        for(i=0;i<NUMVERTICES;i++)  pe->values[i]+=scalar_artdiff*(u*dh1dh6[0][i]+v*dh1dh6[1][i]+w*dh1dh6[2][i]);
    39003894                }
     
    42964290        delete gauss;
    42974291        xfree((void**)&doflist);
     4292}
     4293/*}}}*/
     4294/*FUNCTION Penta::GetStabilizationParameter {{{1*/
     4295double Penta::GetStabilizationParameter(double u, double v, double w, double diameter, double rho_ice, double heatcapacity, double thermalconductivity){
     4296        /*Compute stabilization parameter*/
     4297
     4298        double normu;
     4299        double tau_parameter;
     4300
     4301        normu=pow(pow(u,2)+pow(v,2)+pow(w,2),0.5);
     4302        if(normu*diameter/(3*2*thermalconductivity/(rho_ice*heatcapacity))<1){
     4303                tau_parameter=pow(diameter,2)/(3*2*2*thermalconductivity/(rho_ice*heatcapacity));
     4304        }
     4305        else tau_parameter=diameter/(2*normu);
     4306
     4307        return tau_parameter;
    42984308}
    42994309/*}}}*/
  • issm/trunk/src/c/objects/Elements/Penta.h

    r6238 r6268  
    196196                void      GetSolutionFromInputsDiagnosticVert(Vec solutiong);
    197197                void      GetSolutionFromInputsThermal(Vec solutiong);
     198                double GetStabilizationParameter(double u, double v, double w, double diameter, double rho_ice, double heatcapacity, double thermalconductivity);
    198199                void    GetStrainRate3dPattyn(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input);
    199200                void    GetStrainRate3d(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input, Input* vz_input);
Note: See TracChangeset for help on using the changeset viewer.