CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Why are pointVectorFields not mapped using mapFields?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Henning86

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2012, 08:22
Default Why are pointVectorFields not mapped using mapFields?
  #1
New Member
 
Max Haase
Join Date: Oct 2011
Location: Launceston
Posts: 8
Rep Power: 15
maxof is on a distinguished road
Hi all,
I am simulating boats which are free to heave and trim using interDyMFoam (OF-2.1.0). To make my simulations more efficient, I want to map a coarse mesh solution onto a fine mesh. I works perfectly as long as the object isnt moving. For some reason pointVectorFields (ie the pointDisplacement file) do not get mapped, even though they are required to run the simulation in the the target directory. I tried to grep the orientation (of the moving object) from the source directories pointDisplacement file and chucked it into the target directories file, but that is obviously not working. That draw a few questions regarding my understanding of mapFields and interDyMFoam:

Q1: Why are pointVectorFields not mapped?
Q2: How do I map the mesh deformation correctly?
Q3: Why is there a pointDisplacement AND cellDisplacement file, isnt that redundant information? Latter one is mapped OK.

Grateful for any advice!

Cheers, Max
maxof is offline   Reply With Quote

Old   May 16, 2012, 20:54
Default
  #2
New Member
 
Max Haase
Join Date: Oct 2011
Location: Launceston
Posts: 8
Rep Power: 15
maxof is on a distinguished road
Well I just figured out how to solve Q2: You simply specify (deformed) orientation and centreOfMass AND initialOrientation and initialCentreOfMass. The actual points will be moved accordingly by the solver and the cellDisplacement too. Too easy!

Cheers, Max
maxof is offline   Reply With Quote

Old   April 23, 2014, 09:44
Default
  #3
Member
 
Join Date: Nov 2012
Posts: 83
Rep Power: 14
Henning86 is on a distinguished road
hi


i have a similar problem with interDyMFoam (moving mesh) and mapFields. I just want to map from a coarse to a fine mesh but the solver crashes probably caused by the cell movement.

How did you solve the problem?

i use the command:

mapFields -sourceTime latestTime -consistent


Best regards

Henning
Henning86 is offline   Reply With Quote

Old   April 23, 2014, 12:35
Default solved
  #4
Member
 
Join Date: Nov 2012
Posts: 83
Rep Power: 14
Henning86 is on a distinguished road
hi,


i figured it out.


mapFields doesn't take moving meshes into account. The domains of both cases dont match since the displacement isn't considered resulting in a crash.

It can be solved by using a dynamicMesh instead of fvmesh in mapFields

1. replace all fvmesh with solidBodyMotionFvMesh

2. update Header

3 compile

If you map the fields from the sourcecase to the target case the time folders need to be identical and the target case folder needs to be empty.


best regards

Henning
wyldckat likes this.
Henning86 is offline   Reply With Quote

Old   April 25, 2014, 16:31
Default
  #5
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Henning,

It might make sense to report this issue on the bug tracker: http://www.openfoam.org/bugs/ - specially since you've already found the solution

Although, there is a limitation to this: if you change all "fvMesh" references to "solidBodyMotionFvMesh" or similar, then mapFields will only work if the file "constant/dynamicMeshDict" exists.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   December 25, 2022, 11:49
Default
  #6
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19
quarkz is on a distinguished road
Quote:
Originally Posted by Henning86 View Post
hi,


i figured it out.


mapFields doesn't take moving meshes into account. The domains of both cases dont match since the displacement isn't considered resulting in a crash.

It can be solved by using a dynamicMesh instead of fvmesh in mapFields

1. replace all fvmesh with solidBodyMotionFvMesh

2. update Header

3 compile

If you map the fields from the sourcecase to the target case the time folders need to be identical and the target case folder needs to be empty.


best regards

Henning
Hi Henning86 (or anyone),

Can you explain more clearly how it is done?

What do you mean by:

1. replace all fvmesh with solidBodyMotionFvMesh

2. update Header

3 compile

Thanks!
quarkz is offline   Reply With Quote

Old   June 19, 2023, 12:50
Default
  #7
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 414
Rep Power: 19
quarkz is on a distinguished road
Hi,

I just tried to give it a go.

I'm not sure how to create a new mapField application so I took the easy way out. I simply edit the mapField.* source code and recompile a new OF.

However, I don't think I did it right. I simply search and replace all "fvmesh" with "solidBodyMotionFvMesh" in the 3 source codes:

mapFields.C
mapFields.H
mapFieldsTemplates.C

During compile, the error is:

Code:
In file included from mapFields/mapFields.H:224,
                 from mapFields/mapFields.C:28:
mapFields/mapFieldsTemplates.C:28:10: fatal error: solidBodyMotionFvMesh.H: No such file or directory
 #include "solidBodyMotionFvMesh.H"
          ^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [/home/users/nus/tsltaywb/scratch/OpenFOAM/OpenFOAM-v2212/wmake/rules/General/transform:38: /home/users/nus/tsltaywb/scratch/OpenFOAM/OpenFOAM-v2212/build/linux64Gcc841DPInt32Opt/src/functionObjects/field/mapFields/mapFields.o] Error 1
Can anyone help?
quarkz is offline   Reply With Quote

Reply

Tags
boats, interdymfoam, mapfields, pointdisplacement, pointvectorfields


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
Issues with mapFields BlackBoatNavArch OpenFOAM Pre-Processing 38 May 28, 2021 17:29
Modified mapFields? mturcios777 OpenFOAM Pre-Processing 4 October 31, 2012 12:33
transientSimpleDyMFoam, mapFields and decomposePar pad OpenFOAM Running, Solving & CFD 0 December 3, 2010 06:22
is free meshing or mapped meshing is best for flow problems shanu Main CFD Forum 0 February 18, 2010 12:58
[Other] is free meshing or mapped meshing is best for flow problems shanu OpenFOAM Meshing & Mesh Conversion 0 February 18, 2010 12:56


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