# Mapping patch from simplified 2D simulation to 3D simulation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 12, 2017, 07:18 Mapping patch from simplified 2D simulation to 3D simulation #1 New Member   Eivind Sønnesyn Willmann Join Date: Jan 2017 Posts: 5 Rep Power: 2 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

 May 12, 2017, 10:26 #2 Senior Member     Uwe Pilz Join Date: Feb 2017 Location: Leipzig, Germany Posts: 240 Rep Power: 4 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 -- Sie ahnen nicht, wieviel Poesie in der Berechnung einer Logarithmentafel enthalten ist (Carl Friedrich Gauß)

May 12, 2017, 16:51
#3
New Member

Eivind Sønnesyn Willmann
Join Date: Jan 2017
Posts: 5
Rep Power: 2
Quote:
 Originally Posted by piu58 An easy way to achieve this is approximatng the velocity field by a polynomial and using the uniformValue-polynomial condition for the inlet.

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?

 May 17, 2017, 12:37 #4 Senior Member   Join Date: Jan 2014 Posts: 130 Rep Power: 5 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.

 Tags 2d to 3d, mapfields

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 14:48 LucaFen OpenFOAM Programming & Development 0 November 22, 2016 11:16 gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 225 August 25, 2015 19:43 cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28 cfdengineering OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 48 January 25, 2013 04:28

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