Skip to content

Commit cadaaf3

Browse files
committed
Rename detJacobian to tangentVectorLength for improved clarity
1 parent f4efb3f commit cadaaf3

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/solvers/thermalBoundaryConditionsScript.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ export class ThermalBoundaryConditions {
272272
let basisFunctionDerivKsi = basisFunctionsAndDerivatives.basisFunctionDerivKsi;
273273
let basisFunctionDerivEta = basisFunctionsAndDerivatives.basisFunctionDerivEta;
274274

275-
// Calculate boundary Jacobian
276275
let ksiDerivX = 0;
277276
let ksiDerivY = 0;
278277
let etaDerivX = 0;
@@ -293,8 +292,8 @@ export class ThermalBoundaryConditions {
293292
}
294293
}
295294

296-
// Compute boundary Jacobian (length of tangent vector)
297-
const detJacobian =
295+
// Compute the length of tangent vector
296+
const tangentVectorLength =
298297
side === 0 || side === 2
299298
? Math.sqrt(ksiDerivX ** 2 + ksiDerivY ** 2)
300299
: Math.sqrt(etaDerivX ** 2 + etaDerivY ** 2);
@@ -313,7 +312,7 @@ export class ThermalBoundaryConditions {
313312

314313
// Apply boundary condition with proper Jacobian for all sides
315314
residualVector[globalNodeIndex] +=
316-
-gaussWeights[0] * detJacobian * basisFunction[localNodeIndex] * convectionCoeff * extTemp;
315+
-gaussWeights[0] * tangentVectorLength * basisFunction[localNodeIndex] * convectionCoeff * extTemp;
317316

318317
for (
319318
let localNodeIndex2 = firstNodeIndex;
@@ -323,7 +322,7 @@ export class ThermalBoundaryConditions {
323322
let globalNodeIndex2 = this.nop[elementIndex][localNodeIndex2] - 1;
324323
jacobianMatrix[globalNodeIndex][globalNodeIndex2] +=
325324
-gaussWeights[0] *
326-
detJacobian *
325+
tangentVectorLength *
327326
basisFunction[localNodeIndex] *
328327
basisFunction[localNodeIndex2] *
329328
convectionCoeff;
@@ -369,7 +368,6 @@ export class ThermalBoundaryConditions {
369368
let basisFunctionDerivKsi = basisFunctionsAndDerivatives.basisFunctionDerivKsi;
370369
let basisFunctionDerivEta = basisFunctionsAndDerivatives.basisFunctionDerivEta;
371370

372-
// Calculate boundary Jacobian
373371
let ksiDerivX = 0;
374372
let ksiDerivY = 0;
375373
let etaDerivX = 0;
@@ -390,8 +388,8 @@ export class ThermalBoundaryConditions {
390388
}
391389
}
392390

393-
// Compute boundary Jacobian (length of tangent vector)
394-
const detJacobian =
391+
// Compute the length of tangent vector
392+
const tangentVectorLength =
395393
side === 0 || side === 2
396394
? Math.sqrt(ksiDerivX ** 2 + ksiDerivY ** 2)
397395
: Math.sqrt(etaDerivX ** 2 + etaDerivY ** 2);
@@ -411,7 +409,7 @@ export class ThermalBoundaryConditions {
411409
// Apply boundary condition with proper Jacobian for all sides
412410
residualVector[globalNodeIndex] +=
413411
-gaussWeights[gaussPointIndex] *
414-
detJacobian *
412+
tangentVectorLength *
415413
basisFunction[localNodeIndex] *
416414
convectionCoeff *
417415
extTemp;
@@ -424,7 +422,7 @@ export class ThermalBoundaryConditions {
424422
let globalNodeIndex2 = this.nop[elementIndex][localNodeIndex2] - 1;
425423
jacobianMatrix[globalNodeIndex][globalNodeIndex2] +=
426424
-gaussWeights[gaussPointIndex] *
427-
detJacobian *
425+
tangentVectorLength *
428426
basisFunction[localNodeIndex] *
429427
basisFunction[localNodeIndex2] *
430428
convectionCoeff;

0 commit comments

Comments
 (0)