Changeset 6268
- Timestamp:
- 10/12/10 15:05:50 (14 years ago)
- Location:
- issm/trunk/src/c/objects/Elements
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Penta.cpp
r6260 r6268 2918 2918 double heatcapacity,thermalconductivity,dt; 2919 2919 double scalar_artdiff; 2920 double tau_parameter,diameter ,normu;2920 double tau_parameter,diameter; 2921 2921 double xyz_list[NUMVERTICES][3]; 2922 2922 double B[3][numdof]; … … 3038 3038 GetNodalFunctionsP1Derivatives(&dh1dh6[0][0],&xyz_list[0][0], gauss); 3039 3039 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 3045 3043 scalar_artdiff=tau_parameter*gauss->weight*Jdet; 3046 3047 3044 for(i=0;i<numdof;i++){ 3048 3045 for(j=0;j<numdof;j++){ … … 3830 3827 double thermalconductivity; 3831 3828 double viscosity,temperature; 3832 double tau_parameter,diameter ,normu;3829 double tau_parameter,diameter; 3833 3830 double u,v,w,scalar_artdiff; 3834 3831 double scalar_def,scalar_transient; … … 3890 3887 vz_input->GetParameterValue(&w, gauss); 3891 3888 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); 3898 3890 scalar_artdiff=tau_parameter*gauss->weight*Jdet*phi/(rho_ice*heatcapacity); 3891 //if(dt) scalar_artdiff=scalar_artdiff*dt; 3892 3899 3893 for(i=0;i<NUMVERTICES;i++) pe->values[i]+=scalar_artdiff*(u*dh1dh6[0][i]+v*dh1dh6[1][i]+w*dh1dh6[2][i]); 3900 3894 } … … 4296 4290 delete gauss; 4297 4291 xfree((void**)&doflist); 4292 } 4293 /*}}}*/ 4294 /*FUNCTION Penta::GetStabilizationParameter {{{1*/ 4295 double 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; 4298 4308 } 4299 4309 /*}}}*/ -
issm/trunk/src/c/objects/Elements/Penta.h
r6238 r6268 196 196 void GetSolutionFromInputsDiagnosticVert(Vec solutiong); 197 197 void GetSolutionFromInputsThermal(Vec solutiong); 198 double GetStabilizationParameter(double u, double v, double w, double diameter, double rho_ice, double heatcapacity, double thermalconductivity); 198 199 void GetStrainRate3dPattyn(double* epsilon,double* xyz_list, GaussPenta* gauss, Input* vx_input, Input* vy_input); 199 200 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.