!
! This file is part of SACAMOS, State of the Art CAble MOdels in Spice.
! It was developed by the University of Nottingham and the Netherlands Aerospace
! Centre (NLR) for ESA under contract number 4000112765/14/NL/HK.
!
! Copyright (C) 2016-2017 University of Nottingham
!
! SACAMOS is free software: you can redistribute it and/or modify it under the
! terms of the GNU General Public License as published by the Free Software
! Foundation, either version 3 of the License, or (at your option) any later
! version.
!
! SACAMOS is distributed in the hope that it will be useful, but
! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
! for more details.
!
! A copy of the GNU General Public License version 3 can be found in the
! file GNU_GPL_v3 in the root or at .
!
! SACAMOS uses the EISPACK library (in /SRC/EISPACK). EISPACK is subject to
! the GNU Lesser General Public License. A copy of the GNU Lesser General Public
! License version can be found in the file GNU_LGPL in the root of EISPACK
! (/SRC/EISPACK ) or at .
!
! The University of Nottingham can be contacted at: ggiemr@nottingham.ac.uk
!
!
! File Contents:
! MODULE constants
!
! NAME
! constants
!
! AUTHORS
! Chris Smartt
!
! DESCRIPTION
! This module defines the constants and parameters used in the SACAMOS software
! The parameters are specified here and cannot be changed when running the code
! There are also constants which are set here which may be given different values
! by the user when runnning the software.
!
! COMMENTS
!
!
! HISTORY
!
MODULE constants
USE type_specifications
IMPLICIT NONE
! These parameters are fixed and cannot be changed by the user when running the software
real(dp),parameter :: small=1d-16
real(dp),parameter :: large=1d16
real(dp),parameter :: pi=3.14159265358979323846264338d0
real(dp),parameter :: eps0=8.8541878176D-12
real(dp),parameter :: mu0=pi*4D-7
real(dp),parameter :: c0=2.99792458D8
real(dp),parameter :: Z0=376.73031346177d0
real(dp),parameter :: Y0=1D0/Z0
complex(dp),parameter :: j=(0d0,1d0)
! These could be constants which can be changed from the input files.
real(dp),parameter :: Laplace_ground_plane_ratio=0.8D0 ! the size of the ground plane as a proportion of the radius of the outer boundary used in Laplace
real(dp),parameter :: Laplace_ground_plane_thickness_ratio=0.1d0 ! the thickness of the ground plane as a proportion of its width for Laplce
! The following constants may be changed from the input files.
! minimum transmission line delay parameters. These may be changed in the spice_model_spec file
real(dp) :: ZT_min_delay=1D-12 ! minimum delay in seconds allowed in the transfer impedance model Tvictim-Tsource delay line
real(dp) :: Einc_min_delay=1D-12 ! minimum delay in seconds allowed in the incident field excitation Tvictim-Tz delay line
real(dp) :: Tz_min_delay=1D-12 ! minimum delay in seconds allowed in the incident field excitation Tz delay line
! mesh generation parameters. These may be changed in the .cable_spec and bundle_spec files.
real(dp) :: Laplace_boundary_constant=3d0 ! the distance to the outer boundary in the Laplace solver is calculated as
! Laplace_boundary_constant*(radius of circle surrounding all conductors)
real(dp) :: Laplace_surface_mesh_constant=3d0 ! the mesh edge length on boundaries is calculated as radius/Laplace_surface_mesh_constant
! if Laplace_surface_mesh_constant=5 we have just over 30 elements on the circumference
real(dp) :: Twisted_pair_equivalent_radius=1.5d0 ! The twisted pair commmon mode interaction is calculated by treating the
! common mode as being carried on an 'equivalent cylindrical conductor'
! whose radius is twisted_pair_equivalent_radius*wire radius
! Minimum resistance value. This may be changed in the spice_model_spec file
real(dp) :: Rsmall=1D-8 ! A small resistance value to be used in place of 0 as this is not allowed in LTspice
integer :: first_subcircuit_node_number=1
END MODULE constants