Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83492748
run_am.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 17, 10:53
Size
1 KB
Mime Type
text/x-shellscript
Expires
Thu, Sep 19, 10:53 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20484867
Attached To
R11910 Additive Manufacturing Work
run_am.sh
View Options
#!/bin/bash
#SBATCH --nodes 1
#SBATCH --cpus-per-task 8
#SBATCH --ntasks-per-node 1
#SBATCH --mem 31000
#SBATCH --time 02:00:00
#SBATCH --error=slurm-%j.stderr
#SBATCH --output=slurm-%j.stdout
#SBATCH --job-name=box_am
#SBATCH --mail-user=recep.kubilay@epfl.ch
#SBATCH --mail-type=ALL
echo "*** STARTING JOB ***"
EXTRUDE=true
PART=true
GEOM_FILE="box_real.txt"
THERMAL=true
LAYERS=66
START_LAYER=3
LAYER_THICKNESS=0.03
FREECAD_DIRECTORY="/home/kubilay/anaconda3/envs/freecad_env/lib"
source /home/kubilay/anaconda3/bin/activate
if $PART
then
echo "START PART GEOMETRY"
conda activate freecad_env
#go to Part_geometry directory
cd Part_geometry/
LOG_FILE="part_geometry.log"
#extrude part using the python script if necessary
if $EXTRUDE
then
python3 create_part_geometry.py $FREECAD_DIRECTORY $GEOM_FILE 5 ${GEOM_FILE%.txt}.step > $LOG_FILE
cd ..
conda deactivate
echo "END PART GEOMETRY"
fi
fi
if $THERMAL
then
for z in $(seq $START_LAYER $LAYERS)
do
echo "LAYER $z"
cd Part_geometry/
conda activate freecad_env
LOG_FILE="part_geometry.log"
#layer and mesh the part
echo "START LAYER GEOMETRY"
python3 layer_part.py $FREECAD_DIRECTORY ${GEOM_FILE%.txt}.step/${GEOM_FILE%.txt}.step $LAYER_THICKNESS $z layer mesh >> $LOG_FILE
#convert .msh files into .xml files
conda activate fenicsproject
sh convert_mesh.sh >> $LOG_FILE
echo "END LAYER GEOMETRY"
cd ..
echo "START THERMAL MODEL"
#go the Thermal_model directory
cd Thermal_model/
LOG_FILE="thermal_model.log"
#run thermal problem
mpirun -np 8 python fem_layer_scan_final.py $z 4420 750 27 175 0.8 0.0005 >>$LOG_FILE
echo "END THERMAL MODEL"
cd ..
done
fi
echo "*** JOB FINISHED ***
Event Timeline
Log In to Comment