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/)
-   -   timeVaryingMappedFixedValue: large data mapping on complex inlet boundaries (https://www.cfd-online.com/Forums/openfoam-pre-processing/133655-timevaryingmappedfixedvalue-large-data-mapping-complex-inlet-boundaries.html)

vkrastev April 18, 2014 04:48

timeVaryingMappedFixedValue: large data mapping on complex inlet boundaries
 
Hi all,

it's been quite a long since my last post but well, I'm back again...My issue is basically the following:

1) I want to perform an HVAC simulation with chtMultiRegionFoam on a complex 3D domain (at the moment I have only one fluid domain, but some solid domains are to be added in the future) with multiple inlet sections of different shapes and positions in space;

2) for comparison purposes, the inlet conditions (velocity, temperature, turbulent quantities) have to be mapped from csv files previously generated by a STAR-CCM+ run involving a further domain upstream of the one considered here.

3) there is only a single csv file for all the inlets, containing values and coordinates information

4) values vary in time (e. g. for the velocities I have a csv which is valid from t=0 to t=5 s, another one from t=5 s to t=180 s etc.)

5) there are A LOT of values to map (above 100k points in space)

What I have done till now is generating the OpenFOAM mesh with SHM, assigning a single patch name for all the inlets (though, as I said above, they are actually multiple and separated sections) and trying to set the timeVaryingMappedFixedValue bc for this "single" patch, using one of the csv and generating the text files in the required format and folders (I have previous successfull experiences with this bc, but on single simple-shaped inlet patches and with much less points to map). However, the case crashes already at the mesh decomposition stage with floating point exception, I've tried also different decomposition algorithms (hierarchical and scotch) but the result is the same (see code below, obtained with hierarchical).

Code:

Create time

Decomposing all regions in regionProperties



Decomposing mesh fluid

Create mesh

Calculating distribution of cells
Selecting decompositionMethod hierarchical

Finished decomposition in 9.65 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Distributing points to processors

Constructing processor meshes

Processor 0
    Number of cells = 1301483
    Number of faces shared with processor 1 = 12201
    Number of faces shared with processor 2 = 4935
    Number of faces shared with processor 3 = 472
    Number of processor patches = 3
    Number of processor faces = 17608
    Number of boundary faces = 578481

Processor 1
    Number of cells = 1301483
    Number of faces shared with processor 0 = 12201
    Number of faces shared with processor 3 = 5665
    Number of processor patches = 2
    Number of processor faces = 17866
    Number of boundary faces = 578022

Processor 2
    Number of cells = 1301484
    Number of faces shared with processor 0 = 4935
    Number of faces shared with processor 3 = 10171
    Number of processor patches = 2
    Number of processor faces = 15106
    Number of boundary faces = 577464

Processor 3
    Number of cells = 1301484
    Number of faces shared with processor 0 = 472
    Number of faces shared with processor 1 = 5665
    Number of faces shared with processor 2 = 10171
    Number of processor patches = 3
    Number of processor faces = 16308
    Number of boundary faces = 581354

Number of processor faces = 33444
Max number of cells = 1301484 (3.8417698e-05% above average 1301483.5)
Max number of processor patches = 3 (20% above average 2.5)
Max number of faces between processors = 17866 (6.8412869% above average 16722)

Time = 0
timeVaryingMappedFixedValueFvPatchField : Read 115412 sample points from "/home/f72197a/Work/Pomigliano/HVAC/datiEgeometrie/geometria_completa/runProvarev433/prova2_polymesh36_noLayers/constant/fluid/boundaryData/rev433_Inlets/points"
#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::pointToPointPlanarInterpolation::calcCoordinateSystem(Foam::Field<Foam::Vector<double> > const&) const at ??:?
#4  Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation(Foam::Field<Foam::Vector<double> > const&, Foam::Field<Foam::Vector<double> > const&, double) at ??:?
#5  Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> >::checkTable() at ??:?
#6  Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> >::updateCoeffs() at ??:?
#7  Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> >::timeVaryingMappedFixedValueFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8  Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> > >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#9  Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#10  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::readField(Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#11  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#12  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#13  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) at ??:?
#14 
 at ??:?
#15 
 at ??:?
#16  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#17 
 at ??:?
Floating point exception (core dumped)

Some further info:

1) I'm working with OpenFOAM-2.2.x, latest available update

2) It is not a mesh-related problem, since with other inlet bcs (e. g. fixed uniform values) the case is decomposed and started without any issue

3) I have carefully cheked the points/values correspondence (for now I'm testing only the velocity mapping), and aside from the large number of points (115412, by the way) it seems to be all consistent with the required format.

If someone can share some experience or advice about the topic, I will be very grateful

Thank you in advance

V.

vkrastev April 28, 2014 03:38

So, no hints/advices on this topic? I'm still stuck at the point described in my previous post...

hfs April 29, 2014 03:48

same here :(
http://www.cfd-online.com/Forums/ope...oam-2-2-a.html

vkrastev April 29, 2014 05:42

Quote:

Originally Posted by hfs (Post 488821)

Hi,

I saw your post and I think that you just have to add the "offset" entry in your syntax to get things work (or at least to overcome the specific issue you had reported). Try this one:

inlet { type timeVaryingMappedFixedValue; setAverage 0;
offset (0 0 0);
}
and see what happens.
My problem is something different, It is not related to the syntax but, I guess, to the limits of this BC in handling complex/large sets of data which has to be mapped on geometrically non-trivial patches.

Regards

V.

hfs April 30, 2014 06:17

Thank you very much!

canopus May 29, 2015 11:30

timeVaryingMappedFixedValue for multiple inlet
 
Hi,

I did a precursor simulation on a channel. Because of using blockMesh with clustered wall meshing the channel was split in two blocks. So inlet & Outlet consists of two patches.

Now I want to use
Code:

timeVaryingMappedFixedValue
condition for copying this data to a diffuser again with two inlet patches.

How can this be done is quickest way (without running simulations again at least)?

joshm February 23, 2016 08:51

Quote:

Originally Posted by vkrastev (Post 486851)
Hi all,

it's been quite a long since my last post but well, I'm back again...My issue is basically the following:

1) I want to perform an HVAC simulation with chtMultiRegionFoam on a complex 3D domain (at the moment I have only one fluid domain, but some solid domains are to be added in the future) with multiple inlet sections of different shapes and positions in space;

2) for comparison purposes, the inlet conditions (velocity, temperature, turbulent quantities) have to be mapped from csv files previously generated by a STAR-CCM+ run involving a further domain upstream of the one considered here.

3) there is only a single csv file for all the inlets, containing values and coordinates information

4) values vary in time (e. g. for the velocities I have a csv which is valid from t=0 to t=5 s, another one from t=5 s to t=180 s etc.)

5) there are A LOT of values to map (above 100k points in space)

What I have done till now is generating the OpenFOAM mesh with SHM, assigning a single patch name for all the inlets (though, as I said above, they are actually multiple and separated sections) and trying to set the timeVaryingMappedFixedValue bc for this "single" patch, using one of the csv and generating the text files in the required format and folders (I have previous successfull experiences with this bc, but on single simple-shaped inlet patches and with much less points to map). However, the case crashes already at the mesh decomposition stage with floating point exception, I've tried also different decomposition algorithms (hierarchical and scotch) but the result is the same (see code below, obtained with hierarchical).

Code:

Create time

Decomposing all regions in regionProperties



Decomposing mesh fluid

Create mesh

Calculating distribution of cells
Selecting decompositionMethod hierarchical

Finished decomposition in 9.65 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Distributing points to processors

Constructing processor meshes

Processor 0
    Number of cells = 1301483
    Number of faces shared with processor 1 = 12201
    Number of faces shared with processor 2 = 4935
    Number of faces shared with processor 3 = 472
    Number of processor patches = 3
    Number of processor faces = 17608
    Number of boundary faces = 578481

Processor 1
    Number of cells = 1301483
    Number of faces shared with processor 0 = 12201
    Number of faces shared with processor 3 = 5665
    Number of processor patches = 2
    Number of processor faces = 17866
    Number of boundary faces = 578022

Processor 2
    Number of cells = 1301484
    Number of faces shared with processor 0 = 4935
    Number of faces shared with processor 3 = 10171
    Number of processor patches = 2
    Number of processor faces = 15106
    Number of boundary faces = 577464

Processor 3
    Number of cells = 1301484
    Number of faces shared with processor 0 = 472
    Number of faces shared with processor 1 = 5665
    Number of faces shared with processor 2 = 10171
    Number of processor patches = 3
    Number of processor faces = 16308
    Number of boundary faces = 581354

Number of processor faces = 33444
Max number of cells = 1301484 (3.8417698e-05% above average 1301483.5)
Max number of processor patches = 3 (20% above average 2.5)
Max number of faces between processors = 17866 (6.8412869% above average 16722)

Time = 0
timeVaryingMappedFixedValueFvPatchField : Read 115412 sample points from "/home/f72197a/Work/Pomigliano/HVAC/datiEgeometrie/geometria_completa/runProvarev433/prova2_polymesh36_noLayers/constant/fluid/boundaryData/rev433_Inlets/points"
#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::pointToPointPlanarInterpolation::calcCoordinateSystem(Foam::Field<Foam::Vector<double> > const&) const at ??:?
#4  Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation(Foam::Field<Foam::Vector<double> > const&, Foam::Field<Foam::Vector<double> > const&, double) at ??:?
#5  Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> >::checkTable() at ??:?
#6  Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> >::updateCoeffs() at ??:?
#7  Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> >::timeVaryingMappedFixedValueFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#8  Foam::fvPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::timeVaryingMappedFixedValueFvPatchField<Foam::Vector<double> > >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#9  Foam::fvPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#10  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::readField(Foam::DimensionedField<Foam::Vector<double>, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#11  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields(Foam::dictionary const&) at ??:?
#12  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::readFields() at ??:?
#13  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&) at ??:?
#14 
 at ??:?
#15 
 at ??:?
#16  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#17 
 at ??:?
Floating point exception (core dumped)

Some further info:

1) I'm working with OpenFOAM-2.2.x, latest available update

2) It is not a mesh-related problem, since with other inlet bcs (e. g. fixed uniform values) the case is decomposed and started without any issue

3) I have carefully cheked the points/values correspondence (for now I'm testing only the velocity mapping), and aside from the large number of points (115412, by the way) it seems to be all consistent with the required format.

If someone can share some experience or advice about the topic, I will be very grateful

Thank you in advance

V.

Not sure if you found a solution to this, but I found a solution to the same error to you.

It seems that the pointToPointPlanarInterpolation tries to work out a coordinate system using your z-values so your z-values must change. In a 2D sim which was empty in z, I just duplicated each value with a slightly different z, and it worked fine. Hope this helps.

crazzy.pirate43 June 2, 2016 15:50

Quote:

Originally Posted by canopus (Post 548206)
Hi,

I did a precursor simulation on a channel. Because of using blockMesh with clustered wall meshing the channel was split in two blocks. So inlet & Outlet consists of two patches.

Now I want to use
Code:

timeVaryingMappedFixedValue
condition for copying this data to a diffuser again with two inlet patches.

How can this be done is quickest way (without running simulations again at least)?

if you please, if you found a solution for your problem tell me as I have the same situation now and also for the precursor simulation how did you simulate the lower surface?


All times are GMT -4. The time now is 11:23.