Blame view

TEST_CASES/SHIELD_TRANSFER_IMPEDANCE_AND_SURFACE_IMPEDANCE_CALCULATION/run_shield_model 1.61 KB
886c558b   Steve Greedy   SACAMOS Public Re...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/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/>.   

189467e4   Steve Greedy   First Public Release
22
FULL_SHIELD_MODEL_LIST="
886c558b   Steve Greedy   SACAMOS Public Re...
23
24
25
26
27
28
29
coax_shield
spacewire_inner_shield
spacewire_outer_shield
overshield_1
overshield_2
"

189467e4   Steve Greedy   First Public Release
30
31
32
33
SHIELD_MODEL_LIST="
SPACEWIRE_AWG_26_ESCC_3902003_V2_inner
"

886c558b   Steve Greedy   SACAMOS Public Re...
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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