alexflage |
October 14, 2015 16:42 |
mapFields issue with slight change in geometry
Hi everyone, I'm pretty new to OF but have really enjoyed learning it. This forum has been an excellent resource! I'm stuck with an issue trying to map one solution to another case. Each case takes me a week or two of run time, so it would be fantastic if I could figure out how to map the solution to speed things up.
For starters, here's a picture of a dummy geometry that I'm working with. If we can answer the question on this geometry, I should be able to figure out the issue with my real geometry.
I want to go from this:
https://www.dropbox.com/s/7mmt392mvm...igned.png?dl=0
to this:
https://www.dropbox.com/s/rapn4u851m...ffset.png?dl=0
I have a patch called MAIN_INLET coming in from the left, and two additional inlets named TOP_INLET and BOTTOM_INLET. I initially ran the simulation with the top and bottom inlets turned off, and now I'd like to be able to map that solution to different cases where I shift the top and bottom inlets downstream (and turn them on).
My mapFieldsDict file looks like this:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object MapFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// List of pairs of source/target patches for mapping
patchMap
(
SYM1 SYM1
SYM2 SYM2
MAIN_INLET MAIN_INLET
OUTLET OUTLET
WALL WALL
);
// List of target patches cutting the source domain (these need to be
// handled specially e.g. interpolated from internal values)
cuttingPatches
(
);
// ************************************************************************* //
My command to execute mapFieldsDict is:
Code:
mapFields ../aligned -sourceTime latestTime
I've tried several combinations of patches in the patchMap and cuttingPatches sections, but I'm getting a similar error for each combination:
Code:
alex@alex-ubuntu15:~/Documents/air/offset$ mapFields ../aligned -sourceTime latestTime
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.4.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.4.0-f0842aea0e77
Exec : mapFields ../aligned -sourceTime latestTime
Date : Oct 14 2015
Time : 15:14:09
Host : "alex-ubuntu15"
PID : 30787
Case : /home/alex/Documents/air/offset
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Source: ".." "aligned"
Target: "/home/alex/Documents/air" "offset"
Create databases as time
Case : ../aligned
nProcs : 1
Source time: 0.11
Target time: 0.11
Create meshes
Source mesh size: 718334 Target mesh size: 296624
Creating and mapping fields for time 0.11
Creating mesh-to-mesh addressing for region0 and region0 regions using cellVolumeWeight
Overlap volume: 50.247978
Creating AMI between source patch SYM1 and target patch SYM1 using faceAreaWeightAMI
AMI: Creating addressing and weights between 14115 source faces and 14185 target faces
--> FOAM FATAL ERROR:
Unable to set source and target faces
From function void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces(label&, label&, label&, const boolList&, labelList&, const DynamicList<label>&, bool) const
in file lnInclude/faceAreaWeightAMI.C at line 300.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::abort() at ??:?
#2 Foam::faceAreaWeightAMI<Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > >::calcAddressing(Foam::List<Foam::DynamicList<int, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<double, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<int, 0u, 2u, 1u> >&, Foam::List<Foam::DynamicList<double, 0u, 2u, 1u> >&, int, int) at ??:?
#3 Foam::faceAreaWeightAMI<Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > >::calculate(Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, Foam::List<Foam::List<int> >&, Foam::List<Foam::List<double> >&, int, int) at ??:?
#4 Foam::AMIInterpolation<Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> >, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > >::update(Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&, Foam::PrimitivePatch<Foam::face, Foam::SubList, Foam::Field<Foam::Vector<double> > const&, Foam::Vector<double> > const&) at ??:?
#5 Foam::meshToMesh::calculatePatchAMIs(Foam::word const&) at ??:?
#6 Foam::meshToMesh::constructFromCuttingPatches(Foam::word const&, Foam::word const&, Foam::HashTable<Foam::word, Foam::word, Foam::string::hash> const&, Foam::List<Foam::word> const&) at ??:?
#7 Foam::meshToMesh::meshToMesh(Foam::polyMesh const&, Foam::polyMesh const&, Foam::meshToMesh::interpolationMethod const&, Foam::HashTable<Foam::word, Foam::word, Foam::string::hash> const&, Foam::List<Foam::word> const&) at ??:?
#8 ? at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? at ??:?
Aborted (core dumped)
Sorry for the long post, but if anyone has any suggestions I would greatly appreciate it!
p.s. I realize my target mesh is significantly coarser than the source mesh. I'm not sure if this is an issue--I just made a very quick dummy mesh in a few seconds to get a test case going. In my "real" case, the target mesh is slightly finer than the source mesh, but yields the same result.
Thanks!
|