run_shield_model 1.61 KB
#!/bin/bash
#
# This is a script to generate a spice cable model
# then run a validation test problem to
# check that it is working OK
#
#    Copyright (C) 2015  Chris Smartt
#
#    This program 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. See license.txt for more details. 
#
#    This program 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.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.   

FULL_SHIELD_MODEL_LIST="
coax_shield
spacewire_inner_shield
spacewire_outer_shield
overshield_1
overshield_2
"

SHIELD_MODEL_LIST="
SPACEWIRE_AWG_26_ESCC_3902003_V2_inner
"

for SHIELD_MODEL in $SHIELD_MODEL_LIST
do

  echo "${SHIELD_MODEL}" > shield_conductor_and_transfer_impedance_model_builder_in.txt
../../bin/shield_conductor_and_transfer_impedance_model_builder < shield_conductor_and_transfer_impedance_model_builder_in.txt

    echo "{
       s/LIBRARY_OF_CABLE_MODELS/${LIBRARY_OF_CABLE_MODELS//\//\\/}/g
       s/LIBRARY_OF_BUNDLE_MODELS/${LIBRARY_OF_BUNDLE_MODELS//\//\\/}/g
       s/SYMBOL_DIR/${SYMBOL_DIR//\//\\/}/g 
       }" > sed_command
       
  sed s/SHIELD_MODEL_NAME/${SHIELD_MODEL}/g plot_TEMPLATE.plt > plot.plt
  
  gnuplot plot.plt

done