|
[Sponsors] |
March 28, 2017, 11:21 |
Doubt about 'MapFields' output
|
#1 |
New Member
Savino Martino
Join Date: Oct 2016
Posts: 5
Rep Power: 10 |
Hello everyone,
I'm trying to do some post-processing on data obtained with OpenFOAM. In particular, I need to compare the results of a LES with that obtained with a RANS, visualizing the difference between the two pressure fields. Both simulations have the same STL geometry, the only difference is that the LES simulation used a finer mesh. From what I understand, the fist step is mapping the fields between the two domains using the mapFields utility. I already did it with the following line: Code:
mapFields ../RANS -mapMethod direct -fields '(p)' -consistent So the question is: what exactly the mapFields utility do? What output is it supposed to give? And how can I perfom the difference between the two fields starting from it? I'm using OpenFOAM 2.3.0. Thanks everyone, SM |
|
March 28, 2017, 11:52 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
I don't see why you would map for postprocessing. It's intended use is for preprocessing.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
March 28, 2017, 12:00 |
|
#3 |
New Member
Savino Martino
Join Date: Oct 2016
Posts: 5
Rep Power: 10 |
I already run my case, so I can't do it in preprocessing. From what I understand, mapping the fields is the only way to visualize the punctual difference between the two fields which have different meshes. Am I wrong?
|
|
March 28, 2017, 13:01 |
|
#4 | ||||
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
Quote:
Quote:
Quote:
Quote:
Regards, Ricky
__________________
If it is easy, then something is fishy! Last edited by kera; March 29, 2017 at 05:12. |
|||||
March 28, 2017, 13:29 |
|
#5 | |
New Member
Savino Martino
Join Date: Oct 2016
Posts: 5
Rep Power: 10 |
Quote:
I want to show the difference in results between LES and RANS simulations. For example, I want to produce a figure that shows the difference in values of pressure produced by RANS and LES. In short, what I need to visualize is abs(p_LES - p_RANS) in the whole domain. The STL geometry is the same but the meshes are different, so a simple subtraction with foamCalc gives an error. At this point, is it possible to do that? |
||
March 29, 2017, 04:15 |
|
#6 | |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
Quote:
Code:
probeLocations Regards, Ricky
__________________
If it is easy, then something is fishy! |
||
March 29, 2017, 11:59 |
|
#7 | |
New Member
Savino Martino
Join Date: Oct 2016
Posts: 5
Rep Power: 10 |
Quote:
if I understand well, probeLocations will show the data of specific chosen points in my domain. The fact is that even if I put hundreds of probes, it will be only single points of my domain. I want rather to produce a figure which show the difference in the whole domain, with a color map that highlights the parts where the difference is greater. I try to explain myself with an example; in the attached image a slice of my domain is shown: let's say that the green parts are where the difference is greater while in the blue parts the difference is small. I'm looking for something like this. Thanks againg, SM |
||
March 29, 2017, 12:06 |
|
#8 |
Senior Member
|
Hi,
Just rename your RANS p file to pRANS and map that one to the LES folder (or vice versa). Than do the foamCalc between p and pRANS. You may need to have a dummy pRANS file in the LES folder to start with, not sure. Regards, Tom |
|
March 29, 2017, 12:21 |
|
#9 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Tom, can you quantify the error that mapFields introduces? IIRC it's not terribly accurate (see e.g. http://forum.cad.de/foren/ubb/upload.../Mapfields.png).
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
March 29, 2017, 13:07 |
|
#10 |
Senior Member
|
Hi Anton,
I am not sure if that is possible. I just thought about a method that would at least work within the context of the question, i.e. map a field without overwriting another field. Another option would be to rerun the RANS simulation on the LES mesh, which would at least provide a 1:1 comparison without the errors you mention. It may be a big calculation effort, but surely not as much as the LES run. Regards, Tom |
|
March 30, 2017, 12:07 |
|
#11 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
What I would recommend is mapping the LES result to the RANS mesh, as you would be working with more information. I wouldn't use mapFields (due to aforementioned problems), but Paraview or another postprocessor.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
March 31, 2017, 07:32 |
Solved
|
#12 |
New Member
Savino Martino
Join Date: Oct 2016
Posts: 5
Rep Power: 10 |
Thanks guys,
with your contribution I finally managed to solve my problem. To do that, I needed to change my OpenFOAM version: previously I was using 2.3.0, now I use 2.2.1. I summarize the steps I followed for future users: - As suggested by akidess map the LES field on the RANS mesh, in order to work with more informations; - Move into your RANS case folder and create a 'dummy' folder named 0.1 (say we want to map at time 0.1s) and rename the original '0.1' folder as 0.1.org. Into the dummy folder you have to put only the uniform/time.gz file of the original one; - In the RANS case modify the controlDict with startFrom-->startTime and startTime-->0.1; - from the RANS case folder I run the code: Code:
mapFields -mapMethod mapNearest -consistent ../RANS/ - Now if you want to compute the difference rename the mapped fields into the dummy folder as U_LES.gz, p_LES.gz, etc...(you also need to change the 'object' line into the header of the file otherwise Paraview will not recognize the new name), copy the RANS fields from the 0.1.org folder and do the difference with Paraview (Calculator filter) or foamCalc. This worked on OpenFOAM 2.2.1, but I only managed to correctly map the velocity field. The pressure field was badly mapped (maybe this fact is related to warnings I received when mapFields run, these warnings I suppose are related to face tet errors in the mesh). Regards, Savino Martino |
|
October 17, 2017, 18:24 |
mapFields Hangs
|
#13 |
Member
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 14 |
Hi all,
I am facing a problem with mapFields. I have a finer mesh which needs to be mapped from a coarser mesh for the same geometry. The finer mesh has different names for exact patches so I created a mapFieldsDict as well. When I do mapFields using this command, Code:
mapFields -sourceTime latestTime <location> Code:
Source mesh:12577020 Target Mesh:100616160 thanks, Sugajen |
|
Tags |
comparison, mapfields, openfoam 2.3.0, postprocessing, subtracting fields |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] outputTime in Swak function | immortality | OpenFOAM Community Contributions | 20 | October 6, 2022 13:08 |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 07:16 |
RNG diverged during the analysis the flow over a multi element airfoil, why? | s.m | OpenFOAM Running, Solving & CFD | 0 | August 5, 2013 09:39 |
mixerVesselAMI2D's mass is not balancing | sharonyue | OpenFOAM Running, Solving & CFD | 6 | June 10, 2013 10:34 |
lift and drag on ship superstructures | vaina74 | OpenFOAM Running, Solving & CFD | 3 | June 8, 2010 13:30 |