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

Problem with mapFields - map 2d to 3d

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2013, 04:47
Default Problem with mapFields - map 2d to 3d
  #1
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Hello,

I want to map the solution of a 2d problem to a 3d mesh.
The images show the blocks of the 2d and the 3d meshes.

The 2d mesh has 3600 cells, the 3d has 36000 cells (it is 10 cells deep).

If I use mapFields with an empty mapFieldsDict

Code:
patchMap        ( );

cuttingPatches  ( );
then, mapFields maps the 2d solution onto the first block layer of the 3d mesh. There is an image attached of the alpha1 field. There it is clear to see.

How can I map the 2d fields to the 3d mesh in all depth. I need my 3d mesh to be 3 blocks in depth.
Attached Images
File Type: jpg alphaMapped.jpg (10.6 KB, 86 views)
File Type: jpg blocks2dMesh.jpg (13.8 KB, 66 views)
File Type: jpg blocks3dMesh.jpg (26.2 KB, 64 views)
GerhardHolzinger is offline   Reply With Quote

Old   March 4, 2014, 13:00
Default
  #2
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Hi Gerhard,

did you solve the problem? I also have to map a 2-D solution onto the corresponding 3-d mesh (basically i just "refined" the mesh in 1 direction, from 1 cell depth to 10 cells depth).

best

andrea
Andrea_85 is offline   Reply With Quote

Old   March 4, 2014, 13:26
Default
  #3
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I only came up with a quick and dirty workaround, nothing more.

If your 2D domain is just a thinner version of your 3D domain, you can use transformPoints to "inflate" the mesh so that the domain has the same dimensions as the 3D domain. transformPoints applies either a uniform or a non-uniform scaling factor to the point coordinates.
So, to "inflate" the mesh, I applied a scaling factor greater than one in z-direction and a factor of 1 in the other directions.
Then I could use mapFields.

However, this applies only if the 2D mesh is just a thinner version of the 3D mesh.
GerhardHolzinger is offline   Reply With Quote

Old   March 5, 2014, 04:47
Default
  #4
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
This is exactly what i have.
Following your suggestions, i used transformpoint to "inflate" the 2-d geoemtry to correspond to the 3-d. Then i used the option -consistent and it works...but...is it normal that is so slow? it run all the night without doing anything. It is stuck here

Create databases as time

Source time: 0
Target time: 0
Create meshes

Source mesh size: 4066574 Target mesh size: 20332870

the target mesh is quite big..so maybe its normal. Can it run in parallel to speed up the process?

thanks

andrea
Andrea_85 is offline   Reply With Quote

Old   March 5, 2014, 06:00
Default
  #5
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I have no experience with mapping from a 4M cells case to a 20M cell case. You should check whether you run out of memory. You need to load both meshes in order to map fields between them. You also need to load all fields. So the mapping operation you describe sounds very memory hungry.
GerhardHolzinger is offline   Reply With Quote

Old   March 5, 2014, 06:22
Default
  #6
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
probably it is because the mesh is really big. Anyway i solved it in another way...using matlab

thanks again

andrea
Andrea_85 is offline   Reply With Quote

Old   July 15, 2020, 09:50
Default
  #7
New Member
 
Arash
Join Date: May 2017
Posts: 17
Rep Power: 8
arashgmn is on a distinguished road
Quote:
Originally Posted by Andrea_85 View Post
probably it is because the mesh is really big. Anyway i solved it in another way...using matlab

thanks again

andrea
Hi Andea,
Can you please share your idea of doing it with MATALB? Of course, a brute force way is to look at the coordinates of each mesh element and match it with its 2D correspondence. This is , however, by no means scalable, especially for the cases where both 2D and 3D cases are renumbered.

Thanks for your help,
Arash
arashgmn is offline   Reply With Quote

Reply

Tags
mapfields, preprocessor


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
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Problem Importing Geometry ProE to CFX fatb0y CFX 3 January 14, 2012 19:42
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13


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