CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   FoamToVTK for cases with two meshes (https://www.cfd-online.com/Forums/openfoam-bugs/62532-foamtovtk-cases-two-meshes.html)

maría July 31, 2007 06:35

Thanks Mattijs, I post the pro
 
Thanks Mattijs, I post the problem here.

I have ran a case with two meshes, which are located in:
-case/constant/region1/polyMesh and
-case/constant/region2/polyMesh

I tried to postprocess the results using foamToVTK:

- foamToVTK . <casename> -mesh region1

Then the following ERROR apears:

<<
Create mesh for time = constant

--> FOAM FATAL ERROR : Cannot find file "points" in directory "constant/polyMesh"

From function Time::findInstance(const word& dir, const word& name) in file db/Time/findInstance.C at line 133.

FOAM exiting

>>

The point, is that the file "points" exist but in "constant/region1/polyMesh" and"constant/region2/polyMesh".

I'm using OpenFOAM 1.4.

I would appreciate any idea to solve the problem


Thanks in advance.
María.

mattijs July 31, 2007 09:24

Bit of a regression bug. In po
 
Bit of a regression bug. In postProcessing/dataConversion/foamToVTK/foamToVTK.C

replace

# include "createMesh.H"

with

Info<< "Create mesh for time = "
<< runTime.timeName() << nl << endl;

fvMesh mesh
(
IOobject
(
meshName,
runTime.timeName(),
runTime,
IOobject::MUST_READ
)
);


and recompile (wclean; wmake)

maría September 7, 2007 06:48

Hi! Thanks Mattijs. We have
 
Hi!

Thanks Mattijs. We have changed what you recommend me with some modifications. Now it works.

We replaced:

# include "createMesh.H"

with:

Info<<"Create mesh for time="<< runTime.timeName()<<nl<<endl;
fvMesh mesh
(
IOobject
(
meshName,
meshDir,
//runTime.timeName(),
runTime,
IOobject::MUST_READ
)
);

Where meshDir is as follows:

word meshDir = runTime.timeName();
if (args.options().found("mesh"))
{
meshName = args.options()["mesh"];
fvPath = fvPath/meshName;
meshDir.append("/");
meshDir.append(meshName);
}


Thanks!
María

armin_h September 19, 2007 02:25

Hi Mattijs Just as new user
 
Hi Mattijs

Just as new user of OpenFoam, would you please let me know, where should i go to find the
postProcessing/dataConversion/foamToVTK/foamToVTK.C ?
and provide changes?

I have the same problem as:
-> FOAM FATAL ERROR : Cannot find file "points" in directory "constant/polyMesh"

From function Time::findInstance(const word& dir, const word& name) in file db/Time/findInstance.C at line 133.

FOAM exiting

I read your suggestion to solve this problem and i would please to ask you about that matter.

Many Thanks

mattijs September 19, 2007 03:39

>where should i go to find
 
>where should i go to find

cd $WM_PROJECT_INST_DIR
find . -name foamToVTK.C

Or
http://foam.sourceforge.net/doc/Guides-a4/UserGuide.pdf section 3.6

This problem is fixed in 1.4.1.

armin_h October 29, 2007 12:41

Dear Mattijs Appreciat abou
 
Dear Mattijs

Appreciat about your answer.

sorry for delay to send a feedback of your command .

Many Thanks
Armin


All times are GMT -4. The time now is 20:52.