sed 命令

将 log 文件中,以 Time 开头的行,输出到 time.log sed -n ‘/^Time/p’ log > time.log 将 log 文件中,以 ) 结尾的行,输出到 fo.log sed -n ‘/)$/p’ log > fo.log 单引号之间 /)$/p 为命令,/ 为分隔符,) 表明需要查找的字符是 ),$ 表示行尾,^ 则表示行开头。    Send article as PDF   

Salome 8.3.0 starts slowly

After I reinstall the CentOS 7.4, Salome 8.3.0 starts slowly in about one minute. The problem may be caused by the conflict of network.service and NetworkManager.service. The possible solution is sudo systemctl disable network.service sudo systemctl stop network.service reboot Because network.service does not work on my machine, it should be disabled. Then Salome 8.3.0 starts in one second. This also… Read more →

Install SALOME 8.3 on CentOS 7

After downloading the file from http://files.salome-platform.org/Salome/Salome8.3.0/SALOME-8.3.0-CO7.tgz. The script is as following sudo yum install freeglut atlas -y cd /opt/ tar zxf ~/Downloads/SALOME-8.3.0-CO7.tgz ./ echo “alias salome830=’/opt/SALOME-8.3.0-CO7/salome'” >> ~/.bashrc . ~/.bashrc salome830    Send article as PDF   

OpenFOAM 并行计算

现在,大多数研究生使用的工作电脑或笔记本都是多核多线程的CPU,在 OpenFOAM 中使用并行计算也非常方便。 Step 1: Copy a decomposeParDict file to your case/system folder. cp $FOAMRUN/tutorials/multiphase/interFoam/laminar/damBreak/system/decomposeParDict ./system/ Step 2: edit the decomposeParDict file FoamFile { version 2.0; format ascii; root “”; case “”; instance “”; local “”; class dictionary; object decomposeParDict; } // * * * * * * * * * * * * * * * * * *… Read more →