|
[Sponsors] |
[Salome] Beginner Question: Error using IdeasUnvtoFoam. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 24, 2019, 19:35 |
Beginner Question: Error using IdeasUnvtoFoam.
|
#1 |
Senior Member
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13 |
Hi,
I am getting the following strange error when I use the unv to foam tool. Can anyone please help me figure out what's causing this? --> FOAM FATAL ERROR: cannot find file "/home/xxxx/OpenFOAM/xxxx-6/run/run1/mesh/system/controlDict" From function virtual Foam::autoPtr<Foam::ISstream> Foam::fileOperations::uncollatedFileOperation::rea dStream(Foam::regIOobject&, const Foam::fileName&, const Foam::word&, bool) const in file global/fileOperations/uncollatedFileOperation/uncollatedFileOperation.C at line 519. FOAM exiting Why do I need a controlDict file since I have already created the mesh on Salome? Edit: it does work with a controlDict file. I am just curious how/why it is used and if I can tweak anything in there. |
|
February 25, 2019, 21:48 |
Reason
|
#2 |
Senior Member
nm
Join Date: Mar 2013
Posts: 100
Rep Power: 13 |
If it helps anyone in the future, it was because of pyramid meshes in Salome. I know, rookie mistake. Was resolved easily by splitting pyramids into tetra. Also solved by using the right schemes before meshing.
|
|
April 4, 2019, 13:24 |
|
#3 | |
Senior Member
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28 |
Quote:
The controlDict file contains some basic controls, which are relevant to a lot of tools and solvers of OpenFOAM, e.g. writeFormat: write data in ASCII or binary. The ideasUnvToFoam converter needs a controlDict to be present, because this tool uses a Time object. The instructions to create a Time object are in the file createTime.H. Let's take a look: Code:
Foam::Info<< "Create time\n" << Foam::endl; Foam::Time runTime(Foam::Time::controlDictName, args); Code:
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::Time::Time ( const word& controlDictName, const fileName& rootPath, const fileName& caseName, const word& systemName, const word& constantName, const bool enableFunctionObjects ) : // stuff removed for brevity controlDict_ ( IOobject ( controlDictName, system(), *this, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) ), // stuff removed for brevity So why is the Time object important for a mesh converter? The basic function of a mesh converter requires it to create a valid OpenFOAM-style mesh, either for reading (the foamTo* converters) or for writing (the *ToFoam converters). The mesh is created by instructions from the createMesh.H file. It reads: Code:
Foam::Info << "Create mesh for time = " << runTime.timeName() << Foam::nl << Foam::endl; Foam::fvMesh mesh ( Foam::IOobject ( Foam::fvMesh::defaultRegion, runTime.timeName(), runTime, Foam::IOobject::MUST_READ ) ); Hence the need to create a Time object. In fact, ideasUnvToFoam does not use the createMesh.H file. There are other instructions for creating the mesh, yet the runTime object is still required for the constructor. Here is some actual code of ideasUnvToFoam: Code:
// Construct mesh polyMesh mesh ( IOobject ( polyMesh::defaultRegion, runTime.constant(), runTime ), xferMove(polyPoints), cellVerts, usedPatchFaceVerts, // boundaryFaces, usedPatchNames, // boundaryPatchNames, wordList(patchNames.size(), polyPatch::typeName), // boundaryPatchTypes, "defaultFaces", // defaultFacesName polyPatch::typeName, // defaultFacesType, wordList(0) // boundaryPatchPhysicalTypes ); Also some of the classes which make up the type polyMesh might read some data from controlDict. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
question about uds | tanven | FLUENT | 2 | July 5, 2015 11:22 |
Beginner Question | me.ouda | FLOW-3D | 2 | May 3, 2010 17:47 |
Question about Table applicaiton. | universez | OpenFOAM Running, Solving & CFD | 0 | January 12, 2010 20:31 |
Beginner question :(. Turning on and off zones? | Cjlaumans | FLUENT | 6 | September 2, 2009 15:44 |
CHANNEL FLOW: a question and a request | Carlos | Main CFD Forum | 4 | August 23, 2002 05:55 |