@@ -272,7 +272,6 @@ export class ThermalBoundaryConditions {
272
272
let basisFunctionDerivKsi = basisFunctionsAndDerivatives . basisFunctionDerivKsi ;
273
273
let basisFunctionDerivEta = basisFunctionsAndDerivatives . basisFunctionDerivEta ;
274
274
275
- // Calculate boundary Jacobian
276
275
let ksiDerivX = 0 ;
277
276
let ksiDerivY = 0 ;
278
277
let etaDerivX = 0 ;
@@ -293,8 +292,8 @@ export class ThermalBoundaryConditions {
293
292
}
294
293
}
295
294
296
- // Compute boundary Jacobian ( length of tangent vector)
297
- const detJacobian =
295
+ // Compute the length of tangent vector
296
+ const tangentVectorLength =
298
297
side === 0 || side === 2
299
298
? Math . sqrt ( ksiDerivX ** 2 + ksiDerivY ** 2 )
300
299
: Math . sqrt ( etaDerivX ** 2 + etaDerivY ** 2 ) ;
@@ -313,7 +312,7 @@ export class ThermalBoundaryConditions {
313
312
314
313
// Apply boundary condition with proper Jacobian for all sides
315
314
residualVector [ globalNodeIndex ] +=
316
- - gaussWeights [ 0 ] * detJacobian * basisFunction [ localNodeIndex ] * convectionCoeff * extTemp ;
315
+ - gaussWeights [ 0 ] * tangentVectorLength * basisFunction [ localNodeIndex ] * convectionCoeff * extTemp ;
317
316
318
317
for (
319
318
let localNodeIndex2 = firstNodeIndex ;
@@ -323,7 +322,7 @@ export class ThermalBoundaryConditions {
323
322
let globalNodeIndex2 = this . nop [ elementIndex ] [ localNodeIndex2 ] - 1 ;
324
323
jacobianMatrix [ globalNodeIndex ] [ globalNodeIndex2 ] +=
325
324
- gaussWeights [ 0 ] *
326
- detJacobian *
325
+ tangentVectorLength *
327
326
basisFunction [ localNodeIndex ] *
328
327
basisFunction [ localNodeIndex2 ] *
329
328
convectionCoeff ;
@@ -369,7 +368,6 @@ export class ThermalBoundaryConditions {
369
368
let basisFunctionDerivKsi = basisFunctionsAndDerivatives . basisFunctionDerivKsi ;
370
369
let basisFunctionDerivEta = basisFunctionsAndDerivatives . basisFunctionDerivEta ;
371
370
372
- // Calculate boundary Jacobian
373
371
let ksiDerivX = 0 ;
374
372
let ksiDerivY = 0 ;
375
373
let etaDerivX = 0 ;
@@ -390,8 +388,8 @@ export class ThermalBoundaryConditions {
390
388
}
391
389
}
392
390
393
- // Compute boundary Jacobian ( length of tangent vector)
394
- const detJacobian =
391
+ // Compute the length of tangent vector
392
+ const tangentVectorLength =
395
393
side === 0 || side === 2
396
394
? Math . sqrt ( ksiDerivX ** 2 + ksiDerivY ** 2 )
397
395
: Math . sqrt ( etaDerivX ** 2 + etaDerivY ** 2 ) ;
@@ -411,7 +409,7 @@ export class ThermalBoundaryConditions {
411
409
// Apply boundary condition with proper Jacobian for all sides
412
410
residualVector [ globalNodeIndex ] +=
413
411
- gaussWeights [ gaussPointIndex ] *
414
- detJacobian *
412
+ tangentVectorLength *
415
413
basisFunction [ localNodeIndex ] *
416
414
convectionCoeff *
417
415
extTemp ;
@@ -424,7 +422,7 @@ export class ThermalBoundaryConditions {
424
422
let globalNodeIndex2 = this . nop [ elementIndex ] [ localNodeIndex2 ] - 1 ;
425
423
jacobianMatrix [ globalNodeIndex ] [ globalNodeIndex2 ] +=
426
424
- gaussWeights [ gaussPointIndex ] *
427
- detJacobian *
425
+ tangentVectorLength *
428
426
basisFunction [ localNodeIndex ] *
429
427
basisFunction [ localNodeIndex2 ] *
430
428
convectionCoeff ;
0 commit comments