以前に下記の記事で1.5.x版の動かし方を教えて頂きました。
http://groups.google.com/group/openfoam/browse_thread/thread/6d7ad1f8c6c62d7b
1.6.xでも同じように出来ると思い,1.6.xのチュートリアルからMRFSimpleFoamとmixerVessel2Dのフォルダコピーし
て,MRFSimpleFoamのフォルダに移りwmakeを実行した後に,mixerVessel2Dのフォルダに移り./Allrunを実施すると
下記のようなエラーが出てしまいます。
./Allrun
+ m4
./makeMesh: 5: Syntax error: Bad fd number
となります。
logMRFSimpleFoamを見ますと次のような内容になっています。
Create time
Create mesh for time = 0
--> FOAM FATAL ERROR:
Cannot find file "points" in directory "constant/polyMesh"
From function Time::findInstance(const fileName&, const word&,
const IOobject::readOption)
in file db/Time/findInstance.C at line 148.
FOAM exiting
エラーにあるようにconstant/polyMeshの下にはpointsのデータができていません。どのようにすれば,上手く動くのでしょうか。
どの部分を修正すればよいか,アドバイスやヒントをいただけないでしょうか。
よろしくお願いいたします。
> 下記のようなエラーが出てしまいます。
>
> ./Allrun
> + m4
> ./makeMesh: 5: Syntax error: Bad fd number
> となります。
CFD onlineのOpenFOAM フォーラム
http://www.cfd-online.com/Forums/openfoam/
で、 エラーメッセージの "Syntax error: Bad fd number" で検索してみると、
以下のスレッドがひっかかります。
http://www.cfd-online.com/Forums/openfoam/68913-chtmultifoam-sigfpe.html
このスレッドでは、MRFSimpleFoamではなくて、chtMultiRegionFoamですが、
以下のように同じエラーが出ています。
I tried to run the Tutorial multiRegionHeater for the solver chtMultiRegionFoam
If I try ./Allrun, there is the error:
./Allrun: 19: Syntax error: Bad fd number
このエラーの原因は、スレッドの最後でAndrewさんが書いているように、
makeMeshのスクリプトの5、6行目で使われている">&"がbash拡張の記法であり、
Ubuntuでshの代りに用いられるdashでは動かないことが原因です。
makeMeshここから
---
#!/bin/sh
set -x
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
blockMesh >& log.blockMesh
cellSet >& log.cellSet
#- MRF determines its own faceZone if not supplied
#cp system/faceSetDict_rotorFaces system/faceSetDict
#faceSet
#cp system/faceSetDict_noBoundaryFaces system/faceSetDict
#faceSet
setsToZones -noFlipMap >& log.setsToZones
---
makeMeshここまで
これに対してAndrewさんは、一番簡単なのはスクリプトの先頭を行を
#!/bin/sh
から
#!/bin/bash
に変更すれば動くと書いてます。
または、5、6行目をshの記法に習って
blockMesh > log.blockMesh 2>&1
cellSet > log.cellSet 2>&1
と変更しても動くと思います。
なお、Ubuntuの/bin/shが/bin/dashではなく、/bin/bashにリンクするように変更する手もあります。
Ref. http://gihyo.jp/admin/serial/01/ubuntu-recipe/0018?page=2
makeMeshの最初の行をbashにしたら上手く動きました。
また,makeMmeshの中に書かれている
set -x
とはどのような意味でしょうか?
また
m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/
blockMeshDict
にある
blockMeshDict.m4 とblockMeshDictはどのような関係と理解すればよいのでしょうか。
> また,makeMmeshの中に書かれている
> set -x
> とはどのような意味でしょうか?
"set -x" でググッてしてみてください。
ただしGoogleで検索するとして、set -x だけだと、-xはxを検索語から除く指定になるので、
"set -x"と両端を"(ダブルクオーテーション)で囲ってください。
> また
> m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/
> blockMeshDict
> にある
> blockMeshDict.m4 とblockMeshDictはどのような関係と理解すればよいのでしょうか。
これも"m4 blockMeshDict"で検索してみてください。
英語のサイトかもしれませんが、以上のような質問には、大抵検索すれば、
欲しい答は出てくると思います。
それでは。
2010年3月1日23:35 Sakuma <sakura....@gmail.com>:
> --
> このメールは Google グループのグループ「OpenFOAM」の登録者に送られています。
> このグループに投稿するには、open...@googlegroups.com にメールを送信してください。
> このグループから退会するには、openfoam+u...@googlegroups.com にメールを送信してください。
> 詳細については、http://groups.google.com/group/openfoam?hl=ja からこのグループにアクセスしてください。
>
>
--
-- Masashi Imano
On 3月2日, 午前12:14, Masashi Imano <masashi.im...@gmail.com> wrote:
> 今野です。
>
> > また,makeMmeshの中に書かれている
> > set -x
> > とはどのような意味でしょうか?
>
> "set -x" でググッてしてみてください。
>
> ただしGoogleで検索するとして、set -x だけだと、-xはxを検索語から除く指定になるので、
> "set -x"と両端を"(ダブルクオーテーション)で囲ってください。
>
> > また
> > m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/
> > blockMeshDict
> > にある
> > blockMeshDict.m4 とblockMeshDictはどのような関係と理解すればよいのでしょうか。
>
> これも"m4 blockMeshDict"で検索してみてください。
>
> 英語のサイトかもしれませんが、以上のような質問には、大抵検索すれば、
> 欲しい答は出てくると思います。
>
> それでは。
>
> 2010年3月1日23:35 Sakuma <sakura.maru...@gmail.com>:
> -- Masashi Imano- 引用テキストを表示しない -
>
> - 引用テキストを表示 -
MRFSimpleFoamのソルバーについても更新をするため,1.6.xのチュートリアルからMRFSimpleFoam
のホルダをコピーして,wmakeを実施しましたが,エラーが出るようになって,ソルバーを作る事が出来なく
なってしまいました。
wmakeをすると,下記のようなエコーズラズラと出てきて,最後エラーとなってしまいます。
SOURCE=MRFSimpleFoam.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-
aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -
DNoRepository -ftemplate-depth-40 -I/home/sakuramaru/OpenFOAM/
OpenFOAM-1.6.x/src/turbulenceModels -I/home/sakuramaru/OpenFOAM/
OpenFOAM-1.6.x/src/turbulenceModels/incompressible/RAS/RASModel -I/
home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/transportModels -I/home/
sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/transportModels/incompressible/
singlePhaseTransportModel -I/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/
src/finiteVolume/lnInclude -IlnInclude -I. -I/home/sakuramaru/OpenFOAM/
OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/home/sakuramaru/OpenFOAM/
OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o
Make/linuxGccDPOpt/MRFSimpleFoam.o
In file included from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvm.H:44,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvCFD.H:10,
from MRFSimpleFoam.C:34:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.H:41:31: error: geometricOneField.H: No such file or directory
In file included from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/MRFZones.H:40,
from MRFSimpleFoam.C:37:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
MRFZone.H:220:33: error: MRFZoneTemplates.C: No such file or directory
In file included from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvm.H:44,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvCFD.H:10,
from MRFSimpleFoam.C:34:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.H:63: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.H:65: error: ISO C++ forbids declaration of ‘geometricOneField’
with no type
In file included from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvmDdt.H:90,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvm.H:44,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvCFD.H:10,
from MRFSimpleFoam.C:34:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.C:63: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.C:65: error: ISO C++ forbids declaration of ‘geometricOneField’
with no type
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.C: In function ‘Foam::tmp<Foam::fvMatrix<Type> >
Foam::fvm::ddt(int)’:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmDdt.C:67: error: ‘vf’ was not declared in this scope
In file included from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvm.H:47,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvCFD.H:10,
from MRFSimpleFoam.C:34:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.H: At global scope:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.H:88: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.H:91: error: ISO C++ forbids declaration of
‘geometricOneField’ with no type
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.H:96: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.H:98: error: ISO C++ forbids declaration of
‘geometricOneField’ with no type
In file included from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvmLaplacian.H:188,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvm.H:47,
from /home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude/fvCFD.H:10,
from MRFSimpleFoam.C:34:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:133: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:136: error: ISO C++ forbids declaration of
‘geometricOneField’ with no type
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C: In function ‘Foam::tmp<Foam::fvMatrix<Type> >
Foam::fvm::laplacian(int)’:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:138: error: ‘vf’ was not declared in this scope
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C: At global scope:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:146: error: expected ‘,’ or ‘...’ before ‘&’ token
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:148: error: ISO C++ forbids declaration of
‘geometricOneField’ with no type
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:148: error: redefinition of ‘template<class Type>
Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::laplacian(int)’
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:136: error: ‘template<class Type>
Foam::tmp<Foam::fvMatrix<Type> > Foam::fvm::laplacian(int)’ previously
declared here
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C: In function ‘Foam::tmp<Foam::fvMatrix<Type> >
Foam::fvm::laplacian(int)’:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
fvmLaplacian.C:150: error: ‘vf’ was not declared in this scope
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
readSIMPLEControls.H: In function ‘int main(int, char**)’:
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
readSIMPLEControls.H:6: warning: unused variable ‘momentumPredictor’
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
readSIMPLEControls.H:9: warning: unused variable ‘fluxGradp’
/home/sakuramaru/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/
readSIMPLEControls.H:12: warning: unused variable ‘transonic’
make: *** [Make/linuxGccDPOpt/MRFSimpleFoam.o] エラー 1
エラーのためかapplications/bin/linuxGccDPOptの下のMRFSimpleFoamの実行ファイルが更新されません。
どのように対処をすれば,コンパイルが上手く行くのでしょうか。
ご存じの方がおられましたら教えて頂けないでしょうか。
> > - 引用テキストを表示 -- 引用テキストを表示しない -
>
> - 引用テキストを表示 -
早速,CFD-ONLINEを見て,OpenFOAM-1.6.xのホルダに移り
wcleanLnIncludeAll
を行い,その後
./Allwmake
を行いました。
そして,MRFSimpleFoamのチュートリアルをホルダごとコピーして
wmake
を実施するとコンパイルが上手くできました。
ありがとうごさいました。
On 4月3日, 午後11:32, Takuya OSHIMA <7b2...@gmail.com> wrote:
> 大嶋です。
>
> こちらを試してみて頂けますか。http://www.cfd-online.com/Forums/openfoam-bugs/73935-compile-error-co...
>
> On 4月3日, 午後11:19, Sakuma <sakura.maru...@gmail.com> wrote:
>
>
>
> > fvmDdt.H:41:31: error: geometricOneField.H: No such file or directory- 引用テキストを表示しない -
>
> - 引用テキストを表示 -