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

Mirror results

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By MasterCooler
  • 3 Post By MazenDraw

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 25, 2012, 10:52
Default Mirror results
  #1
New Member
 
BT
Join Date: Jan 2011
Posts: 16
Rep Power: 15
MasterCooler is on a distinguished road
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
TsinghuaBoiler likes this.
MasterCooler is offline   Reply With Quote

Old   January 28, 2012, 04:34
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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 MasterCooler,

Quote:
Originally Posted by MasterCooler View Post
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
__________________

Last edited by wyldckat; January 28, 2012 at 04:37. Reason: reflect filter, not reflect mirror...
wyldckat is offline   Reply With Quote

Old   January 30, 2012, 03:27
Default Problems with reflect-option in paraView
  #3
New Member
 
BT
Join Date: Jan 2011
Posts: 16
Rep Power: 15
MasterCooler is on a distinguished road
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
MasterCooler is offline   Reply With Quote

Old   January 30, 2012, 07:16
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
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
__________________
wyldckat is offline   Reply With Quote

Old   January 30, 2012, 07:50
Default
  #5
New Member
 
BT
Join Date: Jan 2011
Posts: 16
Rep Power: 15
MasterCooler is on a distinguished road
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
MasterCooler is offline   Reply With Quote

Old   January 31, 2012, 17:02
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
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
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
__________________
wyldckat is offline   Reply With Quote

Old   February 1, 2012, 03:11
Default
  #7
New Member
 
BT
Join Date: Jan 2011
Posts: 16
Rep Power: 15
MasterCooler is on a distinguished road
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
MasterCooler is offline   Reply With Quote

Old   December 4, 2014, 13:38
Default mapMirroredFields
  #8
New Member
 
Join Date: Oct 2012
Posts: 19
Rep Power: 14
CFD-Cat is on a distinguished road
Hi,
I'm facing the same problem. Did you create the mapMirroredFields application?
Cheers

Quote:
Originally Posted by MasterCooler View Post
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 is offline   Reply With Quote

Old   August 4, 2016, 19:09
Default
  #9
dpg
New Member
 
Deepen Gala
Join Date: Dec 2015
Location: Austin
Posts: 1
Rep Power: 0
dpg is on a distinguished road
Hi,

I am also facing the same issue. Is there a way to map the mesh and results of a symmetric case(1/4th of original geometry) to the entire geometry and ensuring that the resulting mesh and results are consistent
dpg is offline   Reply With Quote

Old   May 19, 2018, 11:44
Default
  #10
Member
 
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 47
Rep Power: 15
gtarang is on a distinguished road
Hi,
any update on mirrormeshfield application?
gtarang is offline   Reply With Quote

Old   June 11, 2018, 12:00
Default
  #11
Senior Member
 
Lukas Fischer
Join Date: May 2018
Location: Germany, Munich
Posts: 117
Rep Power: 8
lukasf is on a distinguished road
I tried this approach and it is not giving me what I need.

My aim is to mirror an existing mesh and mirror the boundary / initial conditions as well.
I used mirrorMesh to mirror the mesh. The next step would be to mirror the boundary conditions (which are not constant and are therefore given by a list) because the cell size has doubled due to the mirrored mesh.
I used paraview and opened the old mesh (which is not mirrored). I used the Reflect filter copy the input. As you said I have only chosen one patch (e.g. the inlet of a pipe). The filter worked and mirroed the mesh and the data. When I opened a spreadsheet in paraview I could chose cell data and exported the needed data to a .csv file.
My idea was to take this list and exchange it with the old (not mirrored) cell data in the mirrored CFD case. Due to the mirroring of the mesh the cell numbering or whatever is changed. Therefore the new list did not result in mirrored values.
By closer inspection I could see that the Reflect filter from paraview only copied the list and appended it to the end of the list.
What I obviously need is a list which has the correct order.


Quote:
Originally Posted by wyldckat View Post
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
lukasf is offline   Reply With Quote

Old   October 2, 2019, 09:44
Default
  #12
New Member
 
Mazen Draw
Join Date: Sep 2018
Posts: 21
Rep Power: 8
MazenDraw is on a distinguished road
I have found a way around this if anyone is interested:
- copy the original case with the wanted results
- in the copied case, excute rotateMesh on the time folder with the wanted results. This will rotate the results with the mesh to create a symmetric case of your original one
- in the combined case, excute mapFields twice. Once for the original case and once for the copied symmetric case. This should combine both results in one time folder.


I hope this would help someone someday!
ano, JulioPieri and lukasf like this.
MazenDraw is offline   Reply With Quote

Reply

Tags
mirror, mirrormesh, nonuniform, results


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



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