新手求问冲击波管喷出的低马赫数supersonic的 边界条件问题
-
@李东岳 李老师,现在想重新编译时按照http://openfoamwiki.net/index.php/How_to_add_temperature_to_icoFoam。 这个教程想练一遍,发现wmake的时候出现错误
/opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::STARCDCore::STARCDCore()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::fileName const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::STARCDCore::starFileName(Foam::fileName const&, Foam::fileFormats::STARCDCore::fileExt)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `typeinfo for Foam::OBJstream' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::vtk::legacy::contentNames' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::reduce(Foam::Vector2D<double>&, Foam::sumOp<Foam::Vector2D<double> > const&, int, int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::OBJstream::~OBJstream()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::freePstreamCommunicator(int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::geometricSurfacePatch::geometricSurfacePatch(Foam::word const&, int, Foam::word const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::UPstream::finishedRequest(int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::scalePoints(double)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::xferPoints()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::DimensionedField<double, Foam::triSurfacePointGeoMesh>::typeName' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::STARCDCore::writePoints(Foam::Ostream&, Foam::Field<Foam::Vector<double> > const&, double)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::xferFaces()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::OBJstream::write(Foam::Vector<double> const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::NASCore::parseNASCoord(Foam::string const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::fileName const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::STARCDCore::writeHeader(Foam::Ostream&, Foam::fileFormats::STARCDCore::fileHeader)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::abort()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::vtk::legacy::fileHeader(Foam::vtk::formatter&, std::string const&, std::string const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::DimensionedField<double, Foam::triSurfaceGeoMesh>::typeName' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::subsetMesh(Foam::List<bool> const&, Foam::List<int>&, Foam::List<int>&) const' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::OBJstream::write(Foam::face const&, Foam::UList<Foam::Vector<double> > const&, bool)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::vtk::outputOptions::legacy(bool)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::canRead(Foam::fileName const&, bool)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::STARCDCore::readPoints(Foam::IFstream&, Foam::Field<Foam::Vector<double> >&, Foam::List<int>&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::resetRequests(int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::allocatePstreamCommunicator(int, int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::edgeOwner() const' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::OBJstream::OBJstream(Foam::fileName const&, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::OBJstream::write(Foam::UList<Foam::face> const&, Foam::Field<Foam::Vector<double> > const&, bool)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::labelledTri> const&, Foam::List<Foam::geometricSurfacePatch> const&, Foam::Field<Foam::Vector<double> > const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::init(int&, char**&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::geometricSurfacePatch::geometricSurfacePatch()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::UPstream::allToAll(Foam::UList<int> const&, Foam::UList<int>&, int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::STARCDCore::readHeader(Foam::IFstream&, Foam::fileFormats::STARCDCore::fileHeader)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::UIPstream::UIPstream(int, Foam::PstreamBuffers&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::~triSurface()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UIPstream::UIPstream(Foam::UPstream::commsTypes, int, Foam::DynamicList<char, 0u, 2u, 1u>&, int&, int, int, bool, Foam::IOstream::streamFormat, Foam::IOstream::versionNumber)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::sumReduce(double&, int&, int, int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::reduce(double&, Foam::minOp<double> const&, int, int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::operator=(Foam::triSurface const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `typeinfo for Foam::vtk::formatter' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::sortedEdgeFaces() const' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::vtk::legacy::dataTypeNames' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::coordSet::coordSet(Foam::word const&, Foam::word const&, Foam::List<Foam::Vector<double> > const&, Foam::List<double> const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::labelledTri> const&, Foam::Field<Foam::Vector<double> > const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::triSurface const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::List<Foam::labelledTri>&, Foam::List<Foam::geometricSurfacePatch> const&, Foam::Field<Foam::Vector<double> >&, bool)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::addValidParOptions(Foam::HashTable<Foam::string, Foam::word, Foam::string::hash>&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so: undefined reference to `Foam::UPstream::exit(int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::vtk::newFormatter(std::ostream&, Foam::vtk::formatType, unsigned int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::vtkUnstructuredReader::vtkUnstructuredReader(Foam::objectRegistry const&, Foam::ISstream&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::operator==(Foam::geometricSurfacePatch const&, Foam::geometricSurfacePatch const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::~triSurface()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so: undefined reference to `Foam::UPstream::waitRequest(int)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::OBJstream::write(Foam::UList<Foam::edge> const&, Foam::UList<Foam::Vector<double> > const&, bool)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::write(Foam::fileName const&, bool) const' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `typeinfo for Foam::triSurface' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::movePoints(Foam::Field<Foam::Vector<double> > const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::DimensionedField<int, Foam::triSurfaceGeoMesh>::typeName' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::triSurface(Foam::triSurface const&)' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::markZones(Foam::List<bool> const&, Foam::List<int>&) const' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::fileFormats::NASCore::NASCore()' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::writeStats(Foam::Ostream&) const' /opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/lib/libmeshTools.so: undefined reference to `Foam::triSurface::clearOut()' collect2: error: ld returned 1 exit status make: *** [/opt/OpenFOAM/OpenFOAM-v1706/platforms/linux64GccDPInt32Opt/bin/my_icoFoam] Error 1 sh-4.2#
我在想是不是用mac的原因于是 我又在虚拟机上(linux mint)上试了下,直接告诉我wmke command can not found
。。不知道时怎搞的了。。能帮忙看下哪里出错了吗。
🙏 -
@李东岳 感谢老师回复 🙏
Mac上还是没有找到什么原因wmake出错,但是在虚拟机(Linux Mint)上在按照openfoam wiki上添加温度的教程编译成功了。
发现 在createfields.H里加Oobject::MUST_READ,IObject::AUTO_WRITE,和在/systym/controlDict里面加
效果一样 都只是根据初始p,U,粘度等来计算密度,不能直接读取0文件夹里面的rho文件。。。
这是0文件夹里面的rho文件 虽然设置的是1但是计算后在paraview上显示是0.23
怎么才能跟fluent一样直接调节初始场密度呢。
麻烦老师在看下🙏 -
@李东岳
老师好!发现openfoam是不能直接进入密度场的因为openfoam用的是kinematic viscasity.fluent用的是动力粘度。
所以感觉还是得调节p,之前的压力边界条件我设置的是outlet为0.2大气压,inlet为zerogradient。现在调换后inlet为0.2大气压,outlet为zerogradient,initial为1个大气压。然后按照
更改fvscheme后达到预期的冲击波外的区域密度场都1左右,但是发现冲击波前面的涡很微弱。
这是实验得到的图像。冲击波前面有很明显的蓝色的涡。
这是openfoam得到的图像,冲击波前面基本没有涡
-
@东岳 Hi!
又要来麻烦老师了🙏之前的涡的存在问题已经解决。原因是因为压力边界条件设置问题,还有发现k和epsilon之前按照公式算的是10的5次方级别的数字 但是我把他调节成0.5也能算而且精度更准,这个还不知道什么原因。。
现在(其实从之前)就有个关于paraview的问题,把data放到paraview里面显示rho跑第一遍的colour legend和先显示p跑一遍在切换到rho显示的colour legend有些许的不同。
这是显示rho跑第一遍的图 colour legend只显示到0.23
这是先跑完一遍p在切换到rho, colour legend就可以显示到0.06
求老师给点指示
-
@东岳 多谢老师
这是tin文件 传到dropbox上的
https://www.dropbox.com/s/4zw6pr4f9hvy86v/12345.tin?dl=0
这是prj文件在dropbox上的
https://www.dropbox.com/s/997ohw1j55uw2z3/12345.prj?dl=0我用snappyHexMesh弄的网格数在180万左右,网格少点没事,感谢老师啦Thanks♪(・ω・)ノ