2.1. Non-Linear Least Square Fitting Algorithm
Consider a set of data
and a function
The residuals
are vector-valued functions corresponding to the set of data
possibly defined as follows:
(absolute error) or
(relative error)
Let
be
Thus,
R is a differentiable function, where
n represents the number of unknowns (the dimension of
x) and
m is the number of data points, with
.
The general box-constrained nonlinear least squares (NLLS) problem is defined as
where the vectors
represent the lower and upper bounds, respectively, with
, and the objective function is defined by the Euclidean norm of
:
whose gradient
is given by
with
J being the Jacobian matrix of
.
Given the constraints of the box-bounded domain, a diagonal scaling matrix
D with non-zero elements
is defined as follows:
in which
denotes the
th derivative of the function
f.
The first-order necessary conditions for the optimality of problem (
2), in the case of minima within the box or on its boundaries, are expressed as [
11]
To solve problem (
2), HEMSim implements a Gauss–Newton method enhanced with a trust-region strategy, combining the rapid convergence of Newton’s method with the robustness of the steepest descent approach.
The algorithm generates a sequence of feasible iterates
defined by
At each iteration
k, the trust-region subproblem centered at
with radius
involves defining a quadratic approximate model
using a second-order Taylor expansion of
f around
with step
s:
where
and
.
The trust-region strategy requires computing
s by solving
To determine a feasible step
, a trial solution
to the trust-region subproblem is found.
By applying the stationary point condition to (
7), the overdetermined system
is derived, and the minimum norm solution
is given by
where
is the Moore–Penrose pseudoinverse of
, computed via singular value decomposition (SVD) [
14]. This ensures the possibility of solving the problem even if the rank of
is not maximum.
If
, then
is used.
Otherwise, if the absolute minimum of
lies outside the trust region, the solution to subproblem (
8) is chosen as the projection of the solution of the unbounded problem onto the trust region boundary:
This problem can be solved exactly using Lagrange multipliers [
17] or approximately by considering solutions in the subspace generated by the gradient of
f,
, to find the Cauchy point, which is the minimum of
in the gradient direction within the trust region.
The scaled Cauchy step
is defined by solving the constrained minimization problem inside the trust region within the box-boundary where the step
s is constrained to lie on the direction given by the scaled gradient
Since the solution of the problem (
13) is of the form
[
18], the initial
is found being
ensuring it remains within the box constraints
. If
lies outside the current trust region, it is adjusted to stay on the trust region boundary by normalizing by the norm of the gradient:
To ensure the step is feasible, the maximum possible step length before meeting the box bound in the current gradient direction is computed, where
is defined as
where all the
s are defined as
leading to
Then, in the case that
from (
10) is outside the trust region, a dogleg step between
and the Cauchy direction is computed. The classical Cauchy step
, necessary for the construction of the dogleg step, is defined as
and if
, a step
is defined as
Otherwise,
is a convex combination of
and
:
where
is the positive root of the 2nd degree equation obtained, imposing that
,
The projected step
is
where
maps
x into the box-bounded domain;
The projection map is employed at the very last step of the algorithm to achieve the best possible convergence ratio [
18].
The first-order optimality conditions (
5) are satisfied for each
if
meets the sufficient Cauchy decrease condition on the trust region model.
The trial step
is accepted if
meets condition (
23). Otherwise,
is computed as a convex combination of
and
:
with
t chosen such that
At the end of the trust-region subproblem, the predicted reduction of
and the actual reduction in
f at
are checked using
If the trial point reduces the objective function,
is set, and the trust-region radius
is updated, reducing it by a fixed fraction, ensuring it remains above a minimum value
.
If
does not satisfy (
26), it is rejected and
is reduced for improved model reliability. The algorithm fails if
becomes smaller than
.
Successful termination is achieved if one of the following conditions holds:
, meaning that the residual scaled by the dimension of the problem is small;
, meaning that a small gradient condition inside the box-bounded domain has been found;
, meaning that the algorithm is not moving from the current iterate;
where and are prescribed tolerances, and is the machine tolerance.
2.2. JWL Equation of State for Isentropic Expansion
Detonation consists of a chemical transformation of the energetic material into products, accompanied by an extremely rapid transition of its potential energy into mechanical work. All this is caused by the compression and movement of the primary material or its products of decomposition.
To address issues involving the interaction of the explosion with the surrounding environment, such as the dispersion of detonation products into the air, underwater or ground explosions, the reflection of detonation waves from barriers, mass ejection, shell fragmentation, and cumulative jet formation, it is essential to understand the equation of state for the detonation products of condensed explosives. For these hydrodynamic flow scenarios, it is often sufficient to use a simplified equation of state for detonation products, which expresses the internal energy as a function of pressure and specific volume, excluding temperature.
A commonly used equation of this type is the one proposed by Jones, Wilkins, and Lee (JWL) [
1]:
where
p is the pressure measured in ;
is the dimensionless volume, with
- –
v is the reaction products mixture volume measured in ;
- –
is the initial volume of the unreacted energetic compound with initial density ;
are JWL coefficients that need to be determined by an NLLS algorithm.
is the energy of the products released to the surroundings, as described in
Section 2.3.
In applications, Equation (
27) is usually expanded in a Taylor series around the isentrope expansion curve on the pressure–volume plane as follows:
For this reason,
from (
28) is often referred to as an isentropic (or adiabatic) expansion curve (for detonation products).
The contribution of individual terms of Equation (
28) to the total pressure can be seen in
Figure 1.
For large dimensionless volumes, it is
with the exponential contribution terms being nearly zero; for large volumes, the JWL expression converges to the Poisson adiabatic Equation [
19] for an ideal gas with an exponent
.
For a volume ratio
greater than 7, the JWL isentrope and the Poisson adiabatic equation are equivalent [
20]. This consideration is later used in reducing the number of independent JWL coefficients to be determined.
2.3. JWL Energy of Detonation
Usually, the JWL equation is used to evaluate the energy
released in the detonation process and compare it to the theoretical results. At the CJ state, under the assumption that the detonating compound is compressed instantly from the ambient temperature
and atmospheric pressure
up to the Rayleigh line to the CJ point, the energy of the shock wave compressing the unreacted material can be calculated by
or by using the detonation velocity
(the shock wave speed):
where
is the specific volume of detonation products at the CJ point,
is the relative volume of detonation products at the CJ point, and
is the pressure of detonation products at the CJ point.
The detonation energy
is defined as the energy that the detonation reaction products have at an infinite volume:
To sum up, the energy
is the work done by the shock in compressing the explosive, while the energy
represents the chemical energy released by the detonation process.
The JWL equation for the internal energy of detonation products on the isentrope is obtained by integrating the JWL equation of state for pressure, leading to
The energy of detonation formula for any relative volume
, as can be seen from the areas plotted in
Figure 2, is given by
Since at an infinite volume the energy on the isentrope equals zero, the detonation energy is as follows:
It is calculated as the difference between the internal energy of detonation products at the CJ point
) and the energy of shock compression of detonation products up to the C-J point
.
2.4. JWL Fitting Methods
In the context of the CJ detonation theory [
21], a complete JWL parameter set
implicitly defines the detonation velocity
, the detonation pressure
, the relative volume at the CJ-condition
, and and the JWL-parameter
C. It is thereby common to provide
instead of
C because of the practical relevance of the usable detonation energy.
One of the primary methods for determining these constants is the cylinder test [
22]; detailed descriptions of these experiment-based methods can be found in [
7,
23].
Over the years, several methods have been employed to fit JWL parameters [
24,
25]. The form of the JWL equation does not allow for the use of “brute force” fitting methods, since the coefficients are not independent. There is no optimal set of coefficients; an error in one of them can be easily compensated for by the “error” of others. Additional conditions can be applied by using the CJ theory.
One possibility is the one introduced by Baust in [
9] that employs a global optimization method based on particle swarm to obtain a global minimum, given that the parameters are not independent.
A different approach comes from CTEv [
26], in which the optimization is carried out through the minimization of the error function between the experimental points given by energy
and reduced volumes
and the expression for detonation energy
where coefficients
, and
C are fixed and computed at every step of the optimization loop by solving the linear system that enforces the constraints given from the knowledge of the
point
Alternatively, the JWL constants can be derived from the expansion isentrope pressure–volume data
obtained through thermochemical calculations: after determining the detonation parameters of the explosive material (the CJ point), it is possible to calculate the expansion isentrope of the product mixture at selected points on the
plane, as described in [
16]. These points are obtained by constraining the condition of constant entropy;
. This method is employed in several other thermochemical codes aimed at energetic material simulations, such as CHEETAH 2.0 [
27], EXPLO5 [
5], and ZMWNI [
20].
The isentrope data obtained by the thermochemical routines can then be used to determine the parameters of the JWL equation, minimizing the residual .
Generally, in this second approach, it is possible to exclude
from the parameter set that needs to be determined by the minimization procedure and instead provide
or
to implicitly define
from (
32).
Therefore, one must take care to maintain consistency while providing redundant implicit parameters for the JWL that are just a necessity of the underlying CJ conditions. Very often, one finds in the literature that the JWL coefficients implicitly define detonation velocity or pressure that are not consistent with the provided experimental data.
Our methodology for the determination of coefficients is divided into two stages, which are described in the next subsections:
In the first stage, the coefficients of the last term of the equation, C and , are determined using a linearization technique.
In the second stage, the remaining four constants,
, and
, are identified using the NLLS algorithm described in
Section 2.1.
2.5. Linearization of JWL’s Third Term and Least Square Fitting
The first stage is addressed by linearizing the JWL expression (
28), considering only the third term (Poisson adiabatic) for reduced volume data taken after the threshold, set to
. Taking the natural logarithm (denoted by ln) of the Equation (
28) neglecting exponential terms, it is
By introducing the notation
and
, the above equation transforms into a linear form:
where
and
.
The constants
and
are determined using the linear least squares approximation method. First, to estimate the parameters
C and
of the JWL equation, the tail region of the dataset (
) is linearized, exploiting the logarithmic form of the JWL pressure Equation (
33) for volumes significantly larger than the Chapman–Jouguet point, and fitted using the QR decomposition method.
The coefficient matrix
M is created, consisting of a column of ones (intercept term) and
as the second column:
Using the QR decomposition [
17], the matrix
M is factorized into an orthogonal matrix
Q and a non-singular, upper triangular matrix
R:
The coefficients of the linearized equation are computed by solving the triangular system:
The coefficients
are then determined by taking the exponential of the intercept term
and inverting the formula for the slope
This approach efficiently isolates
C and
while minimizing numerical instability through the use of QR decomposition, which is particularly advantageous for overdetermined systems.
Afterwards, setting
and starting from
, the non-linear least square algorithm is applied to (
2). The constants
C and
obtained by this procedure are then used as constraints in the second stage of the non-linear optimization aimed at determining the JWL isentrope coefficients.
2.6. Constraining the CJ Condition
In the second stage, it is assumed that at the Chapman–Jouguet (CJ) point, both the JWL curve and the constant entropy curve derived from thermochemical calculations converge to the same values and share identical derivatives. This condition ensures that the isentrope exponent, defined as the logarithm of the pressure with respect to the logarithm of the volume at fixed entropy,
has identical values at the CJ point for both curves. Using the detonation parameters at the CJ point, the isentrope exponent can be expressed as
where
denotes the initial density of the explosive material and
the pressure at the CJ point in
. Therefore, at the CJ point, two key equations are obtained:
with
being the dimensionless volume at the CJ point. From these equations, the constants
A and
B can be determined as functions of
and
, given fixed values of
,
C, and the CJ parameters obtained from the thermochemical code:
Thus, the JWL isentrope equation, substituting (
43) in (
28), can be written as
The values
, and
and the data coordinates
on the isentrope are obtained from thermochemical calculations [
16].
and
are determined using the algorithm described in
Section 2.1, which involves minimizing the function
defined in (
2) with
;
is the pressure at any point
obtained from the JWL Equation (
28);
is the pressure at point , on the constant entropy curve from thermochemical calculations.
Once
and
are determined, the coefficients
A and
B are obtained from the constraint Equation (
43).