This repository serve as a backup for my Maxwell-TD code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

117 lines
3.3 KiB

#!/bin/bash
# ----------------
# Input Parameters
# ----------------
# [EXE] FileName Freq ExcitationType WaveformType Tdelay Twidth FinalTime FluxType PolyOrder MatrixFree ScalaStudy
# 1. Filename: Simulation Filename
FileName="PW"
# 2. Freq: Central Modulation Frequency (MHz)
Freq=3000
# 3. Planewave Waveform: (0)Time Harmonic (1)Gauss (2)Neumann (3) Modulated Gauss
waveform=1
# 4. Port Waveform (0)TH (1)Gauss
port_waveform=0
# 5. Tdelay (sec): Delay of excitation pulse
# Add 5e-10
Tdelay=2.5e-9
# 6. Tau (sec): Parameter for pulse width
Tau=5e-10
# 7. FinalTime (sec): Termination Time (Set to -1 to activate energy convergence termination)
FinalTime=8e-9
# 8. Gamma
Gamma=0.025
# 9. VTU Output Flag (0) True and (1) False
vtu=0
# 10. Flag to Write Currents / Fields on Surface (0) Off (1) On
WriteSurfBCFlag=1
# 11. Poly Order: (1) First order (2) Second order
PolyOrder=2
# 12. Free Space Comparison: (0) True and (1) False
FreeSpaceComparison=1
# 13. Sampling Rate: sampling frequency / nyquist frequency
# Usually set to 12.5
SamplingRate=12.5
# 14. Padé Acceleration: Number of points used to calculate the Pade Aprox
# Padé Points: Number of points used to calculate the Padé convergence (starting from the top of the list)
# Set to 0 if don’t want to use Padé Approximants
Pade=0
# 15. Time to perform Pade in ns (set to -1 if want to do convergence study)
# Padé Simulated Time: Instead of doing convergence study, once the Padé simulated time is achieved
# Padé will be performed at the end of that Padé period. (ns)
# Set to -1 if you want to perform a convergence study.
PadeTime=-1
# 16. Energy Convergence Factor (%): factor in % required to the energy to decay finish the simulation
# 17. Energy Convergence Factor (%): factor in % required to the energy to decay to finish the simulation (Won’t work unless FinalTime = -1)
EnergyConv=20
# 17. Energy Convergence Number of Points: number of Points used to the determine energy convergence (set to 0 for all)
# Set to 0 to use all the probes
EnergyConvPoints=5
echo "================================================================================"
echo "EXECUTABLE"
EXE="/media/digitalstorm/edf2449b-a566-40a2-8d0f-393bbe8ea1c0/maxwell_td_hybrid_mesher/Maxwell_PML_Regular/MaxwellTD_GPU/build/maxwelltd_CUDA_LTS_DOUBLEpre_FLOATpro-"
echo $EXE
echo $FileName
echo "================================================================================"
# Remove old log files
rm -f *.log
# Check FreeSpaceComparison (needs to be defined or passed in)
if [ "$FreeSpaceComparison" -neq "1" ]; then
mkdir -p Analytic
cd Analytic || exit
rm -f *
cd ..
fi
# Create VTU output directory
mkdir -p VTU_LTS
cd VTU_LTS || exit
rm -f *
cd ..
# Create PROBES output directory
mkdir -p PROBES
cd PROBES || exit
rm -f *
cd ..
# Run DGTD simulation with tee logging
"$EXE" "$FileName" "$Freq" "$waveform" "$port_waveform" "$Tdelay" "$Tau" "$FinalTime" \
"$Gamma" "$vtu" "$WriteSurfBCFlag" "$PolyOrder" "$FreeSpaceComparison" \
"$SamplingRate" "$Pade" "$PadeTime" "$EnergyConv" "$EnergyConvPoints" | tee -a computeDGTD.log
# Move current files to CURRENT, and analytical outputs to Analytic
mkdir -p ./CURRENT
mv -f *.curJ ./CURRENT/
mv -f *.curM ./CURRENT/
mv -f *.csv ./Analytic/
# Post-process RCS
python RCS4.py