CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   MapFields failure or incorrect mesh (https://www.cfd-online.com/Forums/openfoam-pre-processing/62273-mapfields-failure-incorrect-mesh.html)

jvn June 14, 2005 19:23

After running the sonicFoam/fo
 
After running the sonicFoam/forwardStep case, I was interested to see how well the shock could be resolved by interpolating the old solution onto a finer mesh. Using icoFoam/cavityFine as an example, I increased cellDensity in both i and j directions, to 2i+1, 2j+1, then adjusted startTime to 10, then mapFields returned:

Source mesh size: 5250 Target mesh size: 21483


Consistently creating and mapping fields for time 10

interpolating p


--> FOAM FATAL ERROR :

FOAM exiting

Any information concerning the cause of the problem and the means of resolving it would be much appreciated... the error message gives me no clues.

Thanks,
John Van Norman

fabianpk June 15, 2005 03:59

I get a similar error when run
 
I get a similar error when running mapFields. I have just like you, only refined my mesh and want to map a coarser solution to a finer mesh. I get the following with the flag "-consistent"

--> FOAM Warning : treeBoundBox::treeBoundBox(const pointField& points) : cannot find bounding box for zero sized pointFieldreturning zero
Caught arithmetic exception

and then the output from gdb is:

#4 in Foam::meshToMesh::calcAddressing () from /users/tfd/f98faka/OpenFOAM/OpenFOAM-1.1/lib/linuxAMD64Opt/libsampling.so
#5 in Foam::meshToMesh::meshToMesh () from /users/tfd/f98faka/OpenFOAM/OpenFOAM-1.1/lib/linuxAMD64Opt/libsampling.so
#6 in mapConsistentMesh ()


However, if I run without the -consistent flag, it runs ok, but doesn't do anything, that is I get no new directories in the directory with the finer mesh.

/Fabian

hjasak June 15, 2005 08:01

Heya, John: you have probab
 
Heya,

John: you have probably hit a boundary condition that the mapFields does not know about - could you have a look at the fields you're trying to map and tell me what boundary conditions you are using. Not a disaster, you'll just need to re-link the mapFields with some additional libraries (the one including the fvPatchField type you need). Could you try re-running the application under gdb and post the trace-back, e.g.:

gdb mapFields
r root1 case 1 root2 case2

where roots and cases are what you've used with the original mapFields

When it falls over, you'll (probably) be able to type "where" which will produce the info

Fabian: Hmm, is it possible that one of your meshes has no points in it? This is a failure to build the search trees, which means something is probably wrong with the mesh. Try running checkMesh on both meshes.

Hrv

mattijs June 15, 2005 19:18

Also it is helpful to run with
 
Also it is helpful to run with

setenv FOAM_ABORT 1

in your .cshrc (or equiv for .bashrc). This will cause OpenFOAM to abort (and produce a coredump) instead of exit.

jvn June 17, 2005 23:43

I ran the same case with FOAM_
 
I ran the same case with FOAM_ABORT 1 under gdb, with the same results. No stack or core dump, what am I doing wrong here? The fields are mapped (I think) from the same as in sonicFoam/forwardStep. Shall I forward the ~constant/* stuff to you? Perhaps my lack of understanding of OOP is the problem.
Thanks,
JVN

mattijs June 20, 2005 14:15

Hi John, if you have the FO
 
Hi John,

if you have the FOAM_ABORT environment variable set (in OpenFOAM1.1) you should get the message

FOAM aborting (FOAM_ABORT set)

Abort (core dumped)
Exit 134


and as long as you don't limit the coredumpsize you should get a core. (or you can run it inside gdb right away)

jvn June 20, 2005 21:33

Hi Mattijs, I set FOAM_ABORT
 
Hi Mattijs,
I set FOAM_ABORT 1, then ran mapFields under gdb and got the following:

(gdb) r $FOAM_RUN/tutorials/sonicFoam forwardStep $FOAM_RUN/tutorials/sonicFoam forwardStepFine -consistent
Starting program: /home/john/OpenFOAM/OpenFOAM-1.1/applications/bin/linuxOpt/mapFields $FOAM_RUN/tutorials/sonicFoam forwardStep $FOAM_RUN/tutorials/sonicFoam forwardStepFine -consistent
[Thread debugging using libthread_db enabled]
[New Thread 4148004544 (LWP 4372)]
/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.1 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

Exec : /home/john/OpenFOAM/OpenFOAM-1.1/applications/bin/linuxOpt/mapFields /home/john/OpenFOAM/john-1.1/run/tutorials/sonicFoam forwardStep /home/john/OpenFOAM/john-1.1/run/tutorials/sonicFoam forwardStepFine -consistent
Date : Jun 20 2005
Time : 15:25:23
Host : gibbon
PID : 4372
Root :
Case :
Nprocs : 1
Source: "/home/john/OpenFOAM/john-1.1/run/tutorials/sonicFoam" "forwardStep"
Target: "/home/john/OpenFOAM/john-1.1/run/tutorials/sonicFoam" "forwardStepFine"

Create databases as time

Source time: 10
Target time: 10
Create meshes

Source mesh size: 5250 Target mesh size: 21000


Consistently creating and mapping fields for time 10

interpolating p


--> FOAM FATAL ERROR :

FOAM aborting (FOAM_ABORT set)


Program received signal SIGABRT, Aborted.
[Switching to Thread 4148004544 (LWP 4372)]
0xffffe405 in ?? ()
(gdb) where
#0 0xffffe405 in ?? ()
#1 0xffff5c8c in ?? ()
#2 0x00aab955 in raise () from /lib/tls/libc.so.6
Previous frame inner to this frame (corrupt stack?)
(gdb) q

I'm not sure what this means, besides that libc.so.6 is problematic. I have the linux version of OpenFOAM, but my distro (FC3) is the AMDx86_64 and I did not install every package. Think this might be the cause?

Thanks again,
JVN

mattijs June 21, 2005 05:16

Forgot you were running on the
 
Forgot you were running on the AMD64 where traceback does not function properly. It should have printed out all the functions called upto the error.

Does the tutorial showing mapping work? Check what your case is different and work your way back from that.

dictatore_bozorg March 20, 2012 04:45

can someone tell me step by step how i can use mapFields utility?
i use cavityFine tutorial but i cant run this utility and below error appeared:
i make a folder in home by name cavityFine and copy all data of cavity folder (0 and system and constant) in cavityFine after change the mesh resolution go to cavityFine directory and type:
mapFields cavity and the below error appeared:
Please help me

Quote:

ashkan@ubuntu:~/OpenFOAM/ashkan-2.1.0/run$ mapFields cavity
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : mapFields cavity
Date : Mar 20 2012
Time : 12:35:11
Host : "ubuntu"
PID : 2396
Case : /home/ashkan/OpenFOAM/ashkan-2.1.0/run
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "." "cavity"
Target: "/home/ashkan/OpenFOAM/ashkan-2.1.0" "run"

Create databases as time


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/ashkan/OpenFOAM/ashkan-2.1.0/run/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

olivierG March 20, 2012 07:44

hello,

from your log, you are not in cavityFine dir. Try "cd cavityFine" and after "mapFields cavity"
if you don't want to be in cavityFine dir, use the -case option.

regards,
olivier

dictatore_bozorg March 21, 2012 04:56

Dear OliverG thanks for your answer
i did what u said but i cant mapFields cavity to cavityFine i thinks if i write here what i did step by step its better
the question is I CANT MAPPFIELDS CAVTIY TO CAVITYFINE AND NEED HELP?

i did:
1.copy cavity file to home/ashkan-2.1.0/run from openfoam tutorial
2.open terminal in Ubuntu and and make a directory by name cavityFine
3.copy cavity sub directory (0 and constant and systems) to cavityFine directory
4.change mesh resolution in cavityFine directory (constant/blockMeshDict)
5.go to cavityFine directory in Terminal
6.type "mapFileds OpenFOAM/ashkan-2.1.0/run/cavity"
and the below error appeared
Quote:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : mapFields OpenFOAM/ashkan-2.1.0/run/cavity
Date : Mar 21 2012
Time : 12:55:42
Host : "ubuntu"
PID : 2484
Case : /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavityFine
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "OpenFOAM/ashkan-2.1.0/run" "cavity"
Target: "/home/ashkan/OpenFOAM/ashkan-2.1.0/run" "cavityFine"

Create databases as time


--> FOAM FATAL IO ERROR:
cannot find file

file: OpenFOAM/ashkan-2.1.0/run/cavity/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
Please help me

olivierG March 21, 2012 05:07

hello ashkan,

* after step 4, you should create the mesh again, so use blockMesh again.
* step 6: try mapFields ../cavity
(or mapFields -case /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavityFine /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavity if you use the full path).

regards,
olivier

dictatore_bozorg March 21, 2012 05:23

so thanks olivierG
i did what you said and below error appeared:

Quote:

ashkan@ubuntu:~/OpenFOAM/ashkan-2.1.0/run/cavityFine$ mapFields -case /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavityFine /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavity
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : mapFields -case /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavityFine /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavity
Date : Mar 21 2012
Time : 13:21:03
Host : "ubuntu"
PID : 3444
Case : /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavityFine
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "/home/ashkan/OpenFOAM/ashkan-2.1.0/run" "cavity"
Target: "/home/ashkan/OpenFOAM/ashkan-2.1.0/run" "cavityFine"

Create databases as time


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/ashkan/OpenFOAM/ashkan-2.1.0/run/cavityFine/system/mapFieldsDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting
what means that can not find mapFieldsDic?
did i need make a sub directory by name mapFieldsDic?
i so sorry for these questions and so thanks for your help

olivierG March 21, 2012 05:54

yes, you must have mapFieldsDict in your cavityFine/system/ dir.

regards
olivier

dictatore_bozorg March 26, 2012 17:40

dear oliver i do what u said again and again but i cant run mapFields.
how i can make mapFieldsDict?
i really need it and i read OpenFoam tuturials but i cant run mapFields. :(

Indrajit April 13, 2012 07:48

can not run mapFields please help
 
Dear All,

I am trying to run mapFields for cavity tutorial . I am getting error as mentioned here. :confused:
Can you help please.
-------------------------------------------------------------------------
test@ubuntu:~/OpenFOAM/test-2.1.0/run/cavity$ cd cavityFine
test@ubuntu:~/OpenFOAM/test-2.1.0/run/cavity/cavityFine$ mapFields -case /home/test/OpenFOAM/test-2.1.0/run/cavityFine /home/test/OpenFOAM/test-2.1.0/run/cavity -consistent
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-0bc225064152
Exec : mapFields -case /home/test/OpenFOAM/test-2.1.0/run/cavityFine /home/test/OpenFOAM/test-2.1.0/run/cavity -consistent
Date : Apr 16 2012
Time : 22:25:19
Host : "ubuntu"
PID : 2041
Case : /home/test/OpenFOAM/test-2.1.0/run/cavityFine
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "/home/test/OpenFOAM/test-2.1.0/run" "cavity"
Target: "/home/test/OpenFOAM/test-2.1.0/run" "cavityFine"

Create databases as time


--> FOAM FATAL IO ERROR:
cannot find file

file: /home/test/OpenFOAM/test-2.1.0/run/cavityFine/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

test@ubuntu:~/OpenFOAM/test-2.1.0/run/cavity/cavityFine$
-------------------------------------------------------------------

Thanks in Advance,
Indrajit

TianC August 8, 2012 08:35

Hi all,

I am running a 2D cavity simulation (3D region with spanwise cross section all the way across) I want to map these results into a 3D cavity flow (essentially a channel flow with a box cut into the middle of the bottom surface of the channel).

When I try to run mapFields to map the 2D cavity results into the 3D cavity it does not create a 0/ directory (and of course, no files with it). However, there are no error messages and the output message reads as follows:

/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.0-bd7367f93311
Exec : mapFields ../../cavity2D/cavityRes3
Date : Aug 08 2012
Time : 13:24:35
Host : "node6"
PID : 21563
Case : /gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity3D/cavity3Da
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: "../../cavity2D" "cavityRes3"
Target: "/gpfs/home/eng/mauiie/OpenFOAM/mauiie-2.1.0/run/project/cavity3D" "cavity3Da"

Create databases as time
--> FOAM Warning :
From function Time::setControls()
in file db/Time/Time.C at line 226
Reading "../../cavity2D/cavityRes3/0/uniform/time" from line 18 to line 24
Time read from time dictionary 50 differs from actual time 0.
This may cause unexpected database behaviour. If you are not interested
in preserving time state delete the time dictionary.

Source time: 0
Target time: 0
Create meshes

Source mesh size: 4864000 Target mesh size: 8128000


Mapping fields for time 0


End

This looks quite promising and I am perplexed as to why it is not creating any files.

cperalta November 28, 2012 10:10

Hello,

I am having a similar problem as you describe. I do a simulation
in an empty box with blockMesh, then I want to map the fields
to the same box with a finer mesh done with snappy. This time there is an obstacle in the box, so an additional patch. When I run the mapFields I do not get any output either.
Source mesh size: 500000 Target mesh size: 919306


Mapping fields for time 0


End

Did you find out what was the problem in your case?
I tried indicating the patchMap ( );
and cuttingPatches ( ); in mapFieldsDict, but
nothing seems to work, and no error messages of any sort.

Thanks heaps in advance for any help on this.

Carlos

Bernhard November 29, 2012 05:32

I think this can happen if you have already data in the target time directory. You can solve this option, to map it to a time-folder with some original files (like you have in 0/). If these files are empty, except for boundary conditions and uniform internal field, there is no mesh-information stored, and you should be able to use mapFields.

cperalta November 29, 2012 06:13

Thanks, Bernhard!
Yes, I did something similar to that, as it is suggested in this
thread:
http://www.cfd-online.com/Forums/ope...mapfields.html

Best regards,

Carlos


All times are GMT -4. The time now is 06:58.