0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Openfoamのソルバー追加について

Posted at

背景

・Openfoamで計算を行う中で新たなソルバーを追加したい.
・ソルバーを /opt/openfoam*/applications/solvers/に格納. /Allwmake を走らせたところ、Permission deniedで弾かれて進まない.
sudo ./Allwmakeで実施しようとすると,環境変数が読み込まれず wmake: not foundで詰む.

環境

・Windows 10Pro
・Ubuntu 18.04LTS (WSL経由)
・Openfoam6

解決方法

1. sudoに環境変数を引き継ぐ

sudo -E ./Allwmake
・これだとうまくいかなかった.(よくわからんが)

2. root環境でOpenFOAMを読み込む

sudo su
source /opt/openfoam*/etc/bashrc
./Allwmake
・これはOKだった.

3. 所有権の変更

sudo chown -R <ユーザー名>:<グループ名> <OpenFOAMのディレクトリ>
・2で成功したのでNo challenge .

所感

・環境変数の理解は難しい.
・おそらく3をやるべきなのだろう.(以降、計算時にトラブル発生しそうな予感)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?