diff --git a/DOCUMENTATION/SACAMOS_TheoryManual.pdf b/DOCUMENTATION/SACAMOS_TheoryManual.pdf index 6838405..5066aa5 100644 Binary files a/DOCUMENTATION/SACAMOS_TheoryManual.pdf and b/DOCUMENTATION/SACAMOS_TheoryManual.pdf differ diff --git a/DOCUMENTATION/SACAMOS_UserGuide.pdf b/DOCUMENTATION/SACAMOS_UserGuide.pdf index 2311d99..7cf158d 100644 Binary files a/DOCUMENTATION/SACAMOS_UserGuide.pdf and b/DOCUMENTATION/SACAMOS_UserGuide.pdf differ diff --git a/DOCUMENTATION/THEORY_MANUAL/Tex/Laplace_Solver_Documentation.tex b/DOCUMENTATION/THEORY_MANUAL/Tex/Laplace_Solver_Documentation.tex index b8ec4cd..6c17845 100644 --- a/DOCUMENTATION/THEORY_MANUAL/Tex/Laplace_Solver_Documentation.tex +++ b/DOCUMENTATION/THEORY_MANUAL/Tex/Laplace_Solver_Documentation.tex @@ -123,7 +123,7 @@ The Neumann boundary condition is expressed as \begin{equation} \frac{\partial \phi(r) }{\partial r}=0 \end{equation} -This boundary condition enforces a condition that the normal derivitive of the potential is zero and hence the charge on the boundary is zero everywhere. The zero charge propertiy is required by the capacitance matrix calculation and using the Neumann boundary condition leads to convergence of the capacitance matrix elements to the correct values as the boundary distance and the mesh density are increased. +This boundary condition enforces a condition that the normal derivative of the potential is zero and hence the charge on the boundary is zero everywhere. The zero charge propertiy is required by the capacitance matrix calculation and using the Neumann boundary condition leads to convergence of the capacitance matrix elements to the correct values as the boundary distance and the mesh density are increased. \subsubsection{Asymptotic boundary conditions} @@ -189,9 +189,9 @@ And the conductance matrix G\\ \subsection{Iterative solution of the Finite Element matrix equations} \label{cg_solution} -The Finite Element method used to solver the Laplace equation for multi-conductor cable cross sections results in a matrix equation which must be solved for the unknown node potentials. The matrix is sparse however the V3 version of the SACAMOS software does not take advantage of this sparsity and a direct matrix inverse is used to solve the matrix equation. This approach is wasteful in that the sparsity of the matrix equation is not used to our advantage and the size of the Finite Element mesh which can be used is severely limited to systems of the order of 1000's of unknowns. iterative matrix solutions have the potential to improve the efficiency of solution in terms of both storage (a full matrix never needs to be stored) and runtime for a solution. The method implemented here is described in reference \cite{numerical_recipes}. A discussion of the use of conjugate gradient methods in Finite Element solutions may be found in reference \cite{Jin}. +The Finite Element method used to solver the Laplace equation for multi-conductor cable cross sections results in a matrix equation which must be solved for the unknown node potentials. The matrix is sparse however the V3 version of the SACAMOS software did not take advantage of this sparsity and a direct matrix inverse was used to solve the matrix equation. This approach is wasteful in that the sparsity of the matrix equation is not used to our advantage and the size of the Finite Element mesh which can be used is severely limited to systems of the order of 1000's of unknowns. Iterative matrix solutions have the potential to improve the efficiency of solution in terms of both storage (a full matrix never needs to be stored) and runtime for a solution. The method implemented here is described in reference \cite{numerical_recipes}. A discussion of the use of conjugate gradient methods in Finite Element solutions may be found in reference \cite{Jin}. -CCN2 addresses this issue by implementing the biconjugate gradient method, an iterative approach to the solution to the Finite Element matrix equations which is suitable for real and complex symmetric matrix systems as in equation \ref{eq:matrix_eqn}. +The V4 version of the SACAMOS sooftware addresses this issue by implementing the biconjugate gradient method, an iterative approach to the solution to the Finite Element matrix equations which is suitable for real and complex symmetric matrix systems as in equation \ref{eq:matrix_eqn}. \begin{equation} \label{eq:matrix_eqn} \left[ A \right] \left( x \right)=\left( b \right) diff --git a/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_bundle_model.tex b/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_bundle_model.tex index 100a357..9b2dd7b 100644 --- a/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_bundle_model.tex +++ b/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_bundle_model.tex @@ -104,8 +104,14 @@ Laplace_boundary_constant 4 Laplace_surface_mesh_constant 5 +max_mesh_edge_length +0.02e-3 +gp_edge_length +0.1e-3 \end{verbatim} +Note that the Laplace solver must be used in cable bundles containing flex cables or D connectors. + If the iterative solver is used to solve the Finite Element matrix equations then the tolerance for the iterative solution may be set using the parameter $cg\_tol$. The default value is $10^{-12}$. The parameter may be set (in this example to 1E-14) by including the following lines int the \textbf{.bundle\_spec} file: \begin{verbatim} diff --git a/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_model.tex b/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_model.tex index e10df90..f6c849f 100644 --- a/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_model.tex +++ b/DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_model.tex @@ -891,7 +891,7 @@ flex_cable 1.0 \end{verbatim} -When creating cable bundle models including flex cables the mesh control parameter $Max\_mesh\_edge\_length$ may be used to give an additional degree of control over the Finite Element mash. The number of mesh elements in the y direction on conductors (height) is set by the $Laplace\_surface\_mesh\_constant$ parameter (although the minimum number is two). +When creating cable bundle models including flex cables the Laplace solver must be used (include the line $use\_laplace$ following the bundle specification data in the $.bundle\_spec file$), and the mesh control parameter $Max\_mesh\_edge\_length$ may be used to give an additional degree of control over the Finite Element mesh. The number of mesh elements in the y direction on conductors (height) is set by the $Laplace\_surface\_mesh\_constant$ parameter (although the minimum number is two). \clearpage diff --git a/SRC/cable_bundle_model_builder.F90 b/SRC/cable_bundle_model_builder.F90 index d34755d..7ebdb8b 100644 --- a/SRC/cable_bundle_model_builder.F90 +++ b/SRC/cable_bundle_model_builder.F90 @@ -116,6 +116,8 @@ integer :: ierr,ierr2 ! integers to return error codes from file reads integer :: cable integer :: domain integer :: dim + +logical :: must_use_laplace ! START @@ -385,12 +387,30 @@ integer :: dim write(*,*)'Number of cables (not including ground plane) :',bundle_spec%n_cables_without_ground_plane ! read the .cable files required to build the bundle - +! Also check which cable types need to use the Laplace solver in the external domain + must_use_laplace=.FALSE. do cable=1,bundle_spec%n_cables_without_ground_plane CALL read_cable( bundle_spec%cable(cable),cable_file_unit) + if ( (bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_flex_cable) & + .OR.(bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_ML_flex_cable) ) then + must_use_laplace=.TRUE. + end if + + if ( (bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_dconnector) & + .AND.(bundle_spec%n_cables.GT.1) ) then + must_use_laplace=.TRUE. + end if end do ! read the next cable file in the bundle + +! Check whether Laplace solver must be used + + if (must_use_laplace.AND.(.NOT.use_Laplace)) then + run_status='ERROR: The laplace solver must be used for this cable bundle.' + CALL write_program_status() + STOP 1 + end if ! set the ground plane cable data (if it is present) -- libgit2 0.21.2