PSCF v1.1

A Pscf::Fd1d::NrIterator<D> object is an iterator that solves the SCFT equations using the Newton-Raphson method. The only user-defined parameters are the max number of iterations (maxItr) and the error tolerance (epsilon).

The cost of the NR algorithm used here increases rapidly with the number of grid points, and becomes inefficient for problems with greater than roughly 1000 grid points. The algorithm converges in very few iterations from a good initial guess, but has a high computational cost per iteration, and is not particularly robust in the face of a poor initial guess.

Parameter File

The parameter file format for an Fd1d::NrIterator object is:

NrIterator{
epsilon real
maxItr* int (100 by default)
}

Note that maxItr is an optional parameter, which is set to 100 by default. Parameters are described below:

epsilon Error tolerance.
maxItr* maximum number of iterations attempted (optional, 100 by default)

Iteration stops when every element of the residual vector (described below) has an absolute magnitude less than epsilon.

Residual Definition

This iterator defines nMonomer residual expressions at each grid point, and stops iteration when the resulting vector of residuals is zero to within some tolerance. In what follows, to describe how the residuals are defined , we use zero based indices monomer types, and use the notation \( M \) to denote the number of monomer types, which is labelled nMonomer in the parameter file. All but one of the residuals at each grid point are derived from the self-consistent field (SCF) equations, while the last residual at each grid point imposes incompressibility.

The SCF equations at each grid point require that a quantity \( g_{i} \) vanish for each mononomer type \( i = 0, \ldots, M - 1\), where

\[ g_{i} \equiv \sum_{j=0}^{M-1} \chi_{ij}\phi_{j} + \xi - w_{i} \]

where \( \phi_{i} \) and \( w_{i} \) are the volume fraction and chemical potential field for monomers of type i, \( \xi \) is a Langrange multiplier pressure field, and where all fields are evaluated at the same location (i.e., the same grid point). The first \( M \) residuals at each grid point, which we denote by \( r_{0}, \ldots, r_{M - 2} \), are given by differences

\[ r_{i} = g_{i+1} - g_{0} \]

between values of \( g_{j} \) for monomer indices i+1 and 0.

The last residual at each grid point is given by the difference

\[ r_{M-1} = \sum_{i=0}^{M-1}\phi_{i} - 1 \]

between the sum of volume fractions and unity.

Closed Systems (Canonical Ensemble)

The residual equations must be modified slightly for the case in which a value of phi rather than mu is specified for every molecular species, giving a closed system or a canonical statistical mechanical ensemble. In this case, it may be shown that the solution of the modified diffusion equation yields concentration fields for which the spatial average of the sum of volume fractions of all species, averaged over the domain volume, is always exactly equal to 1, for any choice of w fields. This means that, in this case, one of the incompressibility constraints is redundant, since the incompressibility constraint at the last grid point would automatically satisfied if the constraints at the other points were all satisfied. In addition, in this case, the solution of the SCF equations is also not unique, because the residual values can be shown to be invariant under a shift in the Lagrange multiplier field at all grid point points by any spatially homgeneous constant. To address both problems, in the case of a closed system, the incompressibility constraint at the last grid point is replaced by a requirement that the w field value for the last monomer type must equal zero at this grid point, by convention.