Commit e483a221551d50bc6a4e74fbd2e2d6e2aa9e371a

Authored by Chris Smartt
1 parent 2b58f1d5

Add check for use_laplace for flex cables in cable_bundle_model_builder plus sma…

…ll corrections and additions to documentation
DOCUMENTATION/SACAMOS_TheoryManual.pdf
No preview for this file type
DOCUMENTATION/SACAMOS_UserGuide.pdf
No preview for this file type
DOCUMENTATION/THEORY_MANUAL/Tex/Laplace_Solver_Documentation.tex
... ... @@ -123,7 +123,7 @@ The Neumann boundary condition is expressed as
123 123 \begin{equation}
124 124 \frac{\partial \phi(r) }{\partial r}=0
125 125 \end{equation}
126   -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.
  126 +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.
127 127  
128 128 \subsubsection{Asymptotic boundary conditions}
129 129  
... ... @@ -189,9 +189,9 @@ And the conductance matrix G\\
189 189 \subsection{Iterative solution of the Finite Element matrix equations} \label{cg_solution}
190 190  
191 191  
192   -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}.
  192 +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}.
193 193  
194   -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}.
  194 +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}.
195 195  
196 196 \begin{equation} \label{eq:matrix_eqn}
197 197 \left[ A \right] \left( x \right)=\left( b \right)
... ...
DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_bundle_model.tex
... ... @@ -104,8 +104,14 @@ Laplace_boundary_constant
104 104 4
105 105 Laplace_surface_mesh_constant
106 106 5
  107 +max_mesh_edge_length
  108 +0.02e-3
  109 +gp_edge_length
  110 +0.1e-3
107 111 \end{verbatim}
108 112  
  113 +Note that the Laplace solver must be used in cable bundles containing flex cables or D connectors.
  114 +
109 115 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:
110 116  
111 117 \begin{verbatim}
... ...
DOCUMENTATION/USER_GUIDE/Tex/creating_a_cable_model.tex
... ... @@ -891,7 +891,7 @@ flex_cable
891 891 1.0
892 892 \end{verbatim}
893 893  
894   -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).
  894 +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).
895 895  
896 896 \clearpage
897 897  
... ...
SRC/cable_bundle_model_builder.F90
... ... @@ -116,6 +116,8 @@ integer :: ierr,ierr2 ! integers to return error codes from file reads
116 116 integer :: cable
117 117 integer :: domain
118 118 integer :: dim
  119 +
  120 +logical :: must_use_laplace
119 121  
120 122 ! START
121 123  
... ... @@ -385,12 +387,30 @@ integer :: dim
385 387 write(*,*)'Number of cables (not including ground plane) :',bundle_spec%n_cables_without_ground_plane
386 388  
387 389 ! read the .cable files required to build the bundle
388   -
  390 +! Also check which cable types need to use the Laplace solver in the external domain
  391 + must_use_laplace=.FALSE.
389 392 do cable=1,bundle_spec%n_cables_without_ground_plane
390 393  
391 394 CALL read_cable( bundle_spec%cable(cable),cable_file_unit)
  395 + if ( (bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_flex_cable) &
  396 + .OR.(bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_ML_flex_cable) ) then
  397 + must_use_laplace=.TRUE.
  398 + end if
  399 +
  400 + if ( (bundle_spec%cable(cable)%cable_type.EQ.cable_geometry_type_dconnector) &
  401 + .AND.(bundle_spec%n_cables.GT.1) ) then
  402 + must_use_laplace=.TRUE.
  403 + end if
392 404  
393 405 end do ! read the next cable file in the bundle
  406 +
  407 +! Check whether Laplace solver must be used
  408 +
  409 + if (must_use_laplace.AND.(.NOT.use_Laplace)) then
  410 + run_status='ERROR: The laplace solver must be used for this cable bundle.'
  411 + CALL write_program_status()
  412 + STOP 1
  413 + end if
394 414  
395 415 ! set the ground plane cable data (if it is present)
396 416  
... ...