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 The script is as following sudo yum install freeglut atlas mesa-libGLU -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 →

blockMesh error

Recently, I met the problem when I ran blockMesh word::stripInvalid() called for word hostname localhost-01 For debug level (= 2) > 1 this is considered fatal the problem may come from postfix mail service. when checked your postfix, it output valid_hostname: invalid character 32(decimal): localhost-01 postfix: fatal: unable to use my own hostname localhost-01 The reason was that there’s a… Read more →