CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Mirror results (http://www.cfd-online.com/Forums/openfoam/96543-mirror-results.html)

MasterCooler January 25, 2012 10:52

Mirror results
 
Good afternoon,

I am looking for a way to mirror an existing solution for further processing on it.

I have found "mirrorMesh", but it doesn't do what I want as only the cells are mirrored not the boundary fields (at least if they are nonuniform). Mirroring in paraView is known to me as well but didn't work.

Can anybody provide some help?

Thanks in advance.

Cheers
MasterCooler

wyldckat January 28, 2012 04:34

Greetings MasterCooler,

Quote:

Originally Posted by MasterCooler (Post 341109)
Mirroring in paraView is known to me as well but didn't work.

Can you specify what didn't work with the reflect filter on ParaView?

Best regards,
Bruno

MasterCooler January 30, 2012 03:27

Problems with reflect-option in paraView
 
Good morning,

for a better understanding let me explain the background of my question a little further:
I have done a simulation with a model which is symmetric why I have simulated it by a half only. Now I want to use that model for derive the boundary conditions of a submodel which is not symmetric anymore. Therefore I looked to mirror the first solution before mapFields is used.

The problem is that mapFields operates on the time folders and I can't save the reflected solution as a new timefolder, isn't it?

Thanks for further advice.

Cheers
MasterCooler

wyldckat January 30, 2012 07:16

Hi MasterCooler,

Mmm... I suppose the quickest solution, without looking deeper into this, is to load one patch at a time:
  1. Load your symmetric case in ParaView.
  2. Apply the Reflect filter. (I know, but keep reading.)
  3. In the "Object Inspector -> Properties" on the first open case file, you should see a small list box that lists all of the regions, including internal mesh, patches and some other things, such as zones. De-select the internal mesh and select a patch.
  4. Extract the info you need and perhaps export it if necessary (File -> Save Data).
  5. Go back to the first file and choose another patch. Hit the "Apply" button and it will auto-update the reflection.
If you have gazillions of patches, then use the Python macro system: Tools -> Start Trace

Good luck!
Bruno

MasterCooler January 30, 2012 07:50

Hey Bruno,

so far so good. I have done it in the similar way before. But how can I process the exported data further?

I tried to mirror the halve mesh by mirrorMesh and applying the exported data on it, so that a complete new time folder is created. But it doesn't work obviously as the numbering of the mirrored Mesh and the exported data don't fit to each other.

Further I explicitly need the internalMesh for further processing what caused other problems as the number of cells of the mirrored mesh and exported data from the reflected mesh don't fit to each other.

Many thanks for your advice.

Cheers
Ben

wyldckat January 31, 2012 17:02

Hi Ben,

I don't if you're going to like this answer, but it's the best I can figure out: you will have to create a hybrid application that merges mirrorMesh with mapFields.

Basically:
  • mirrorMesh was designed for only mirroring the mesh itself.
  • mapFields was designed for only interpolating/copying values from one mesh to another, where both meshes represent the same exact volume.
The simplest solution might a half-way merger, where:
  • Still use mirrorMesh for creating the mirrored mesh.
  • Then create a mapMirroredFields, where the fields are interpolated/copied onto both sides of the mesh.
Good luck!
Bruno

MasterCooler February 1, 2012 03:11

Good morning Bruno,

your comments according mirrorMesh and mapFields fit exactly to my experience.

Currently my programming ability is still weak but I will take the opportunity and try to create that mapMirroredFields soon and provide it here afterwards.

In advance thanks a lot for your time and help.

Have a nice day.

Cheers
Ben

CFD-Cat December 4, 2014 13:38

mapMirroredFields
 
Hi,
I'm facing the same problem. Did you create the mapMirroredFields application?
Cheers

Quote:

Originally Posted by MasterCooler (Post 342209)
Good morning Bruno,

your comments according mirrorMesh and mapFields fit exactly to my experience.

Currently my programming ability is still weak but I will take the opportunity and try to create that mapMirroredFields soon and provide it here afterwards.

In advance thanks a lot for your time and help.

Have a nice day.

Cheers
Ben



All times are GMT -4. The time now is 01:49.