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

timeVaryingMappedFixedValue: large data mapping on complex inlet boundaries

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   April 18, 2014, 04:48
Default timeVaryingMappedFixedValue: large data mapping on complex inlet boundaries
  #1
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 364
Rep Power: 11
vkrastev is on a distinguished road
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 is offline   Reply With Quote

Old   April 28, 2014, 03:38
Default
  #2
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 364
Rep Power: 11
vkrastev is on a distinguished road
So, no hints/advices on this topic? I'm still stuck at the point described in my previous post...
vkrastev is offline   Reply With Quote

Old   April 29, 2014, 03:48
Default
  #3
hfs
Member
 
Join Date: Jul 2012
Posts: 64
Rep Power: 6
hfs is on a distinguished road
same here
http://www.cfd-online.com/Forums/ope...oam-2-2-a.html
hfs is offline   Reply With Quote

Old   April 29, 2014, 05:42
Default
  #4
Senior Member
 
Vesselin Krastev
Join Date: Jan 2010
Location: University of Tor Vergata, Rome
Posts: 364
Rep Power: 11
vkrastev is on a distinguished road
Quote:
Originally Posted by hfs View Post
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.
vkrastev is offline   Reply With Quote

Old   April 30, 2014, 06:17
Default
  #5
hfs
Member
 
Join Date: Jul 2012
Posts: 64
Rep Power: 6
hfs is on a distinguished road
Thank you very much!
hfs is offline   Reply With Quote

Old   May 29, 2015, 11:30
Default timeVaryingMappedFixedValue for multiple inlet
  #6
Member
 
SM
Join Date: Dec 2010
Posts: 89
Rep Power: 7
canopus is on a distinguished road
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)?
canopus is offline   Reply With Quote

Old   February 23, 2016, 09:51
Default
  #7
New Member
 
Josh
Join Date: Jun 2013
Posts: 14
Rep Power: 5
joshm is on a distinguished road
Quote:
Originally Posted by vkrastev View Post
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.
joshm is offline   Reply With Quote

Old   June 2, 2016, 15:50
Default
  #8
New Member
 
Join Date: May 2016
Posts: 12
Rep Power: 2
crazzy.pirate43 is on a distinguished road
Quote:
Originally Posted by canopus View Post
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?
crazzy.pirate43 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complex FFT for real data Hisham Main CFD Forum 0 November 12, 2011 15:53
Complex .stl data for volume meshing in ICEM CFD Nils_H ANSYS Meshing & Geometry 5 September 2, 2011 08:39
Mapping outlet patch to inlet patch of new case val46 OpenFOAM 0 February 18, 2011 12:22
Import gmsh msh to Foam adorean Open Source Meshers: Gmsh, Netgen, CGNS, ... 24 April 27, 2005 08:19
Making new inlet boundaries Stephen FLUENT 7 March 31, 2004 10:11


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