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

Mapping patch from simplified 2D simulation to 3D simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By hxaxtma

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2017, 07:18
Default Mapping patch from simplified 2D simulation to 3D simulation
  #1
New Member
 
Eivind Sønnesyn Willmann
Join Date: Jan 2017
Posts: 5
Rep Power: 9
eivind is on a distinguished road
Hi,
I am currently running a 3D simpleFoam case of a rough channel.
In order to find the appropriate inlet conditions, I have also done a cyclic 2D simulation of a slice of my geometry.

I now want to map the solution at the inlet patch of the cyclic 2D simulation, onto the inlet of the 3D case and use as boundary condition here.
(The 3D simulation is not cyclic due to inhomogenities in spanwise direction.)

Does anynoe have any ideas on how to achieve this?

I have been thinking maybe mapFields may be a part of the solution, but I have never used this utility before...

What do you think?

Any help would be really much appreciated!

Cheers,
Eivind
eivind is offline   Reply With Quote

Old   May 12, 2017, 10:26
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
An easy way to achieve this is approximatng the velocity field by a polynomial and using the uniformValue-polynomial condition for the inlet.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   May 12, 2017, 16:51
Default
  #3
New Member
 
Eivind Sønnesyn Willmann
Join Date: Jan 2017
Posts: 5
Rep Power: 9
eivind is on a distinguished road
Quote:
Originally Posted by piu58 View Post
An easy way to achieve this is approximatng the velocity field by a polynomial and using the uniformValue-polynomial condition for the inlet.
Thank you for your reply!

I have already tried this method, but it was difficult to fit the turbulence fields (especially epsilon) to polynomials. Then the eddy viscosity may get unrealistic values. It works - but it is not the ideal/most elegant solution.

Anyone familiar with mapFields? Would it do the trick?
eivind is offline   Reply With Quote

Old   May 17, 2017, 12:37
Default
  #4
Senior Member
 
Join Date: Jan 2014
Posts: 179
Rep Power: 12
hxaxtma is on a distinguished road
My workaround for cases like this is the following:

1) sample your 2D inlet profiles (U, p, etc..)
2) write out the coordinates of your 3D inlet with writecellCentres
3)Load your 2D profile into python
4)Interpolate your profile on the 3D inlet coordinates in Python,
5)Write out a nonuniform vector list and paste this into your 3D inlet U or p file

That's it!

You can also extend this to your internalField and so on!

mapFields cannot do this kind of interpolation, maybe swak4foam is able to, but I do not use this.
arashgmn likes this.
hxaxtma is offline   Reply With Quote

Reply

Tags
2d to 3d, mapfields


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
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
Ho to run a 2D simulation with variables from a 3D patch LucaFen OpenFOAM Programming & Development 0 November 22, 2016 10:16
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
[Commercial meshers] Fluent msh and cyclic boundary cfdengineering OpenFOAM Meshing & Mesh Conversion 48 January 25, 2013 03:28


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