小结
- 修改辐射公式
- 编写输出辐射相关的的脚本格式化存储
- 修改对应你的read_case_s.m
- debug for matlab scrpits
- 修改 mat2d script
- 新版本solps-iter完全使用
- 编写,带有过滤功能的scan scripts
-
- 做选择非常消耗精力,设置默认函数,减少选择耗散
- 无明显优势,前者优先
修改辐射计算公式
#!/bin/bash
# function: calculate the radiation and save in 2D_data/radiation_w.last10
base_path=`pwd`
if [ ! -d "${base_path}/2D_data" ]
then
mkdir 2D_data
echo "Create the 2D_data file "
else
#echo "2D_data has existed."
fi
# ==================== get the radiation information ========================== #
# core radiation
echo "comp brna 0.0 rmma pot m* 0 0 sumz ev rm* -1.0 rm* brhe m- b2ra 0 0 sumz m+ b2br 0 0 sumz m+ 1 nreg m* sumx sumy jxa writ f.y " | b2plot >& /dev/null ; less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","core_t",$2)}' > "${base_path}/2D_data/radiation_w.last10"
# sol radiation
echo "comp brna 0.0 rmma pot m* 0 0 sumz ev rm* -1.0 rm* brhe m- b2ra 0 0 sumz m+ b2br 0 0 sumz m+ 2 nreg m* sumx sumy jxa writ f.y " | b2plot >& /dev/null ; less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","sol_t",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# it radiation
echo "comp brna 0.0 rmma pot m* 0 0 sumz ev rm* -1.0 rm* brhe m- b2ra 0 0 sumz m+ b2br 0 0 sumz m+ 3 nreg m* sumx sumy jxa writ f.y " | b2plot >& /dev/null ; less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","it_t",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# ot radiation
echo "comp brna 0.0 rmma pot m* 0 0 sumz ev rm* -1.0 rm* brhe m- b2ra 0 0 sumz m+ b2br 0 0 sumz m+ 4 nreg m* sumx sumy jxa writ f.y " | b2plot >& /dev/null ; less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","ot_t",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# total radiation
echo "comp brna 0.0 rmma pot m* 0 0 sumz ev rm* -1.0 rm* brhe m- b2ra 0 0 sumz m+ b2br 0 0 sumz m+ sumx sumy jxa writ f.y " | b2plot >& /dev/null ; less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","total_t",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# ================================= radiation of carbon ========================= #
# core radiation
echo "comp b2ra 2 8 sumz b2br 2 8 sumz m+ 1 nreg m* sumx sumy jxa writ f.y" | b2plot >&/dev/null;less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","core_c",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# sol radiation
echo "comp b2ra 2 8 sumz b2br 2 8 sumz m+ 2 nreg m* sumx sumy jxa writ f.y" | b2plot >&/dev/null;less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","sol_c",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# it radiation
echo "comp b2ra 2 8 sumz b2br 2 8 sumz m+ 3 nreg m* sumx sumy jxa writ f.y" | b2plot >&/dev/null;less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","it_c",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# ot radiation
echo "comp b2ra 2 8 sumz b2br 2 8 sumz m+ 4 nreg m* sumx sumy jxa writ f.y" | b2plot >&/dev/null;less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","ot_c",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
# total radiation
echo "comp b2ra 2 8 sumz b2br 2 8 sumz m+ sumx sumy jxa writ f.y" | b2plot >&/dev/null;less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("%8s: %f\n","total_c",$2)}' >> "${base_path}/2D_data/radiation_w.last10"
less "${base_path}/2D_data/radiation_w.last10"
如何存储
echo "comp brna 0.0 rmma pot m* 0 0 sumz ev rm* -1.0 rm* brhe m- b2ra 0 0 sumz m+ b2br 0 0 sumz m+ 1 nreg m* sumx sumy jxa writ f.y " | b2plot > & /dev/null ; less b2pl.exe.dir/b2plot.write | tail -n1 | awk '{printf("test: %f\n", $2)}' > test
修改内容
- read_case_*.m
- 修改 data_scan
- 修改most_data
--
- 修改most_data
新集群使用
- 检查是否设 ps
- 修改 DEVICE 为 HL-2M
- 设置快捷键
# .bashrc
alias solps='cd $HOME/version/solps-iter'
- 4.测试并行是否打开
which b2mn.exe
# default for turnning on the mpi
set_mpi # add in the tail of setup.csh
# add some alias
- 移动case
- 配置脚本
- 产生数据
scan path
-
- 修改辐射相关
- 辐射功率分布
- 碳辐射
- mat2d_add
- most_add
-
- 确认辐射没有出问题
- 重新运行
- 删除空文件
- 调整输出信息
- pdena 的输出:单独输出这个不能画图,plot_tri_eirene
#!/bin/bash
# sepcify the father path of case cluster
path=${1}
# specify the string, containning in casename
if [ $# -lt 1 ] ; then
echo "Please enter the path. "
exit 0
elif [ $# -gt 1 ]; then
cn=${2}
else
cn='MW' # default value
fi
# get the case_namelist, which you want to read
rm case_namelist &> /dev/null
ls ${path} | awk '/'${cn}'/ {print $0}' > case_namelist
while read -r case_name
do
case_path="${path}/${case_name}"
if [ -d ${case_path} ]
then
cd "${path}/${case_name}"
# ====== callback your scripts in here ======== #
pwd
# ============================================= #
else
echo "Please check ${case_name}, which is not a directroy."
fi
done < case_namelist
调用
scan /home/zhangyanjie/version/solps-iter/runs/hl-2m/SFD sf
网友评论