|
[Sponsors] | |||||
mapFields issue with slight change in geometry |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Alex
Join Date: Sep 2015
Posts: 4
Rep Power: 12 ![]() |
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
(
);
// ************************************************************************* //
Code:
mapFields ../aligned -sourceTime latestTime 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)
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! |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Alex
Join Date: Sep 2015
Posts: 4
Rep Power: 12 ![]() |
Well, after a lot of trial and error I seem to have fixed the issue. I changed the mapFieldsDict file to be the following:
Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// List of pairs of source/target patches for mapping
patchMap
(
OUTLET OUTLET
MAIN_INLET MAIN_INLET
);
// List of target patches cutting the source domain (these need to be
// handled specially e.g. interpolated from internal values)
cuttingPatches
(
);
// ************************************************************************* //
|
|
|
|
|
|
|
|
|
#3 |
|
New Member
Alex
Join Date: Sep 2015
Posts: 4
Rep Power: 12 ![]() |
Well, unfortunately, my issue is not solved. mapFields executes without errors, and when I open up paraview I see a pretty good mapping of my solution onto the new geometry. However, when I try to run the solver, I get the following error:
Code:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 : compressibleInterFoam
Date : Oct 15 2015
Time : 20:07:39
Host : "alex-ubuntu15"
PID : 9104
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
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0.11
Reading g
PIMPLE: Operating solver in PISO mode
Reading field p_rgh
Reading field U
Reading/calculating face flux field phi
Constructing twoPhaseMixtureThermo
Selecting thermodynamics package
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectFluid;
specie specie;
energy sensibleInternalEnergy;
}
Selecting thermodynamics package
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState perfectGas;
specie specie;
energy sensibleInternalEnergy;
}
Reading thermophysical properties
Calculating field g.h
Selecting turbulence model type LESModel
Selecting LES turbulence model Smagorinsky
Selecting LES delta type smooth
Selecting LES delta type cubeRootVol
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::compressible::mutkWallFunctionFvPatchScalarField::calcMut() const at ??:?
#4 Foam::compressible::mutWallFunctionFvPatchScalarField::updateCoeffs() at ??:?
#5 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() at ??:?
#6 Foam::compressible::LESModels::Smagorinsky::updateSubGridScaleFields(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#7 Foam::compressible::LESModels::Smagorinsky::Smagorinsky(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&, Foam::word const&) at ??:?
#8 Foam::compressible::LESModel::adddictionaryConstructorToTable<Foam::compressible::LESModels::Smagorinsky>::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) at ??:?
#9 Foam::compressible::LESModel::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) at ??:?
#10 Foam::compressible::turbulenceModel::addturbulenceModelConstructorToTable<Foam::compressible::LESModel>::NewturbulenceModel(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) at ??:?
#11 Foam::compressible::turbulenceModel::New(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::fluidThermo const&, Foam::word const&) at ??:?
#12 ? at ??:?
#13 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#14 ? at ??:?
Floating point exception (core dumped)
Thanks! |
|
|
|
|
|
|
|
|
#4 |
|
New Member
Roman
Join Date: Nov 2015
Posts: 2
Rep Power: 0 ![]() |
The point is that your wall cuts the domain where inlet was, thus not all of your patches are described in patchMap, but some of them must be defined in cuttingPatches.
|
|
|
|
|
|
![]() |
| Tags |
| mapfields, mapfieldsdict, openfoam |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [CAD formats] translating geometry from Abaqus to OpenFOAM | skuznet | OpenFOAM Meshing & Mesh Conversion | 3 | January 10, 2014 14:49 |
| Export geometry file from ansys mechanical | browns6 | Structural Mechanics | 0 | August 27, 2013 17:19 |
| Problem Importing Geometry ProE to CFX | fatb0y | CFX | 3 | January 14, 2012 20:42 |
| An issue with temperature change in unsteady prob | Ashok kumar | FLUENT | 1 | January 13, 2009 05:34 |
| Geometry Issue! | Mann | CFX | 2 | January 14, 2008 17:33 |