CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Strange random behaviour of mapFields

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2014, 10:37
Default Strange random behaviour of mapFields
  #1
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello all,

I am facing a weird problem with mapFields when called automatically from a python script.

Setup:
OpenFOAM 2.2.x, CentOS 6.4

I am running an optimisation loop for a bulbous bow of a ship using LTSInterFoam. In each iteration of the optimisation loop the geometry is slightly changed and the simulation is then initialized with mapFields using a case with pre-calculated data. The automatization of the whole process (mesh generation, field mapping, partitioning, running the simulation, evaluating the results) works just fine and is done with python.

But:
Quite often mapFields just stops during the interpolation of the first field, without any error message. Consequently the fields are just uniformly initialized instead of having the pre-calculated data. This seems to happen randomly and does not depend on the new geometry the initial case is mapped onto. I know this because I run 12 different simulations with the same new geometry simultaneously, the difference being the draught and speed of the ship, and the problem only shows up on some simulations (sometimes none, sometimes all, mostly a few).

Here is what I do in the python script when calling mapFields:

cmd_line = 'mapFields -noFunctionObjects %s' % LOCAL_STARTDATA_SOURCE_DIR
cmd_args = shlex.split(cmd_line)
p = subprocess.Popen(cmd_args)
p.wait()

This is the content of system/ mapFieldsDict:

patchMap ( xMax xMax xMin xMin zMax zMax zMin zMin yMax yMax );
cuttingPatches ( rumpf_ship rumpf_ship yMin yMin );


Here is the output of mapFields:

Source: "/scratch_local" "startdata_01"
Target: "/scratch_local/ResMngr/ofuser/85b6ca4a-b9ba-453c-af61-5684e3085c9a_1414404186" "wulst_opt_Nsga2_1b
is8_02_des0007_01"

Create databases as time

Source time: 10000
Target time: 0
Create meshes

Source mesh size: 555227 Target mesh size: 555060

--> FOAM Warning :
From function Foam::List<Foam::tetIndices> Foam:olyMeshTetDecomposition::faceTetIndices(con st polyMes
h&, label, label)
in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
No base point

... a bunch of similar warnings...
The following lines seem to be specific to the failure of mapFields, as these warning do not appear among the warnings mapFields issues when running correctly:

--> FOAM Warning :
From functi in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/mapFields"
#6
in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/mapFields"
#7
in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/mapFields"
#8
in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/mapFields"
#9
in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/mapFields"
#10 __libc_start_main in "/lib64/libc.so.6"
#11
in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/bin/mapFields"
on Foam::List<Foam::tetIndices> Foam:olyMeshTetDecomposition::faceTetIndices(con st polyMesh&, label, labe
l)
...
--> FOAM Warning :
From funct#0 Foam::error:rintStack(Foam::Ostream&) in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/
linux64Gcc47DPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux64Gcc47DPOpt/lib/li
bOpenFOAM.so"
#2
at sigaction.c:0
#3 Foam::meshToMesh::calculateInverseDistanceWeights( ) const in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platfo
rms/linux64Gcc47DPOpt/lib/libsampling.so"
#4 Foam::meshToMesh::inverseDistanceWeights() const in "/usr/local/OpenFOAM/OpenFOAM-2.2.x/platforms/linux
64Gcc47DPOpt/lib/libsampling.so"
#5
ion Foam::List<Foam::tetIndices> Foam:olyMeshTetDecomposition::faceTetIndices(con st polyMesh&, label, lab
el)
in file meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C at line 570
No base point for face 50858, 4(13262 16868 17830 17196), produces a valid tet decomposition.
--> FOAM Warning :
...

Mapping fields for time 10000

interpolating p_rghResidual
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.x-68d8dc9f4acc
Exec : renumberMesh -overwrite -latestTime

Here the python script starts renumberMesh while mapFields is not ready yet (or maybe it is ready but is giving up for some occult reason). And as the python code snippets show, the subprocess is not called in the background.

Can someone tell me why on earth this happens??? This never occurs when I start the mapping of fields manually from a python shell (for testing purposes).

Any idea is appreciated!

Thank you!
blaise is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
strange pressure behaviour with symmetricPlane boudary condition - interFoam duongquaphim OpenFOAM Running, Solving & CFD 10 August 20, 2013 15:00
Strange residuals behaviour xxxx Main CFD Forum 1 July 13, 2013 15:40
Strange behaviour when using LienCubicKE and NonlinearKEShih hani OpenFOAM Running, Solving & CFD 20 March 6, 2013 11:06
Poiseuille flow: strange behaviour samiam1000 OpenFOAM 6 February 17, 2013 04:31
strange behaviour of GGI in parallel on axis symmetrical case A.Devesa OpenFOAM Running, Solving & CFD 0 April 6, 2010 04:58


All times are GMT -4. The time now is 15:19.