Changeset 18501
- Timestamp:
- 09/10/14 21:06:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/analyses/SeaiceAnalysis.cpp
r18498 r18501 75 75 /*Intermediaries */ 76 76 IssmDouble Jdet,D_scalar,dt,thickness,concentration; 77 IssmDouble ocean_coef,rho_ocean,ocean_lin_drag_coef,ocean_quad_drag_coef; 78 IssmDouble vx,vy,oceanvx,oceanvy,vnorm,ocean_turning_angle; 77 79 IssmDouble C[3][3]; 78 80 IssmDouble* xyz_list = NULL; … … 90 92 element->GetVerticesCoordinates(&xyz_list); 91 93 element->FindParam(&dt,TimesteppingTimeStepEnum); 92 IssmDouble rho_i = element->GetMaterialParameter(MaterialsRhoIceEnum); 93 Input* thickness_input = element->GetInput(SeaiceThicknessEnum); _assert_(thickness_input); 94 element->FindParam(&ocean_coef,BasalforcingsOceanCoefEnum); 95 element->FindParam(&ocean_lin_drag_coef,BasalforcingsOceanLinDragCoefEnum); 96 element->FindParam(&ocean_quad_drag_coef,BasalforcingsOceanQuadDragCoefEnum); 97 element->FindParam(&ocean_turning_angle,BasalforcingsOceanTurningAngleEnum); 98 IssmDouble rho_i = element->GetMaterialParameter(MaterialsRhoIceEnum); 99 Input* thickness_input = element->GetInput(SeaiceThicknessEnum); _assert_(thickness_input); 100 Input* vx_input = element->GetInput(VxEnum); _assert_(vx_input); 101 Input* vy_input = element->GetInput(VyEnum); _assert_(vy_input); 102 Input* oceanvx_input = element->GetInput(BasalforcingsOceanVxEnum); _assert_(oceanvx_input); 103 Input* oceanvy_input = element->GetInput(BasalforcingsOceanVyEnum); _assert_(oceanvy_input); 94 104 95 105 /* Start looping on the number of gaussian points: */ … … 125 135 &Ke->values[0],1); 126 136 127 /*Create Coriolis part*/ 137 /*Create Ocean forcing part*/ 138 oceanvx_input->GetInputValue(&oceanvx,gauss); 139 oceanvy_input->GetInputValue(&oceanvy,gauss); 140 vx_input->GetInputValue(&vx,gauss); 141 vy_input->GetInputValue(&vy,gauss); 142 vnorm = sqrt(pow(oceanvx-vx,2) + pow(oceanvy-vy,2)); 143 D_scalar = dt*concentration*ocean_coef*rho_ocean*(ocean_lin_drag_coef+ocean_quad_drag_coef*vnorm)*cos(ocean_turning_angle)*gauss->weight*Jdet; 144 TripleMultiply(M,1,numdof,1, 145 &D_scalar,1,1,0, 146 M,1,numdof,0, 147 &Ke->values[0],1); 128 148 } 129 149 … … 170 190 element->FindParam(&ocean_coef,BasalforcingsOceanCoefEnum); 171 191 element->FindParam(&ocean_lin_drag_coef,BasalforcingsOceanLinDragCoefEnum); 172 element->FindParam(&ocean_quad_drag_coef,BasalforcingsOceanQuadDragCoefEnum);173 192 element->FindParam(&ocean_quad_drag_coef,BasalforcingsOceanQuadDragCoefEnum); 174 193 element->FindParam(&ocean_turning_angle,BasalforcingsOceanTurningAngleEnum); … … 226 245 /*Ocean forcing*/ 227 246 vnorm = sqrt(pow(oceanvx-vx,2) + pow(oceanvy-vy,2)); 228 constant_part = concentration* air_coef*rho_air*(air_lin_drag_coef+air_quad_drag_coef*vnorm);247 constant_part = concentration*ocean_coef*rho_ocean*(ocean_lin_drag_coef+ocean_quad_drag_coef*vnorm); 229 248 for(int i=0;i<numnodes;i++){ 230 249 pe->values[i*2+0] += dt*constant_part*(oceanvy-vy)*sin(ocean_turning_angle)*Jdet*gauss->weight*basis[i];
Note:
See TracChangeset
for help on using the changeset viewer.