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

Mapping patch from simplified 2D simulation to 3D simulation

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

Reply
 
LinkBack Thread Tools 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: 2
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: 240
Rep Power: 4
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
--
Sie ahnen nicht, wieviel Poesie in der Berechnung
einer Logarithmentafel enthalten ist (Carl Friedrich Gauß)
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: 2
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: 130
Rep Power: 5
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.
hxaxtma is offline   Reply With Quote

Reply

Tags
2d to 3d, mapfields

Thread Tools
Display Modes

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 On
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 14:48
Ho to run a 2D simulation with variables from a 3D patch LucaFen OpenFOAM Programming & Development 0 November 22, 2016 11:16
Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation on Windows, Mac and other Unsupported Platforms 225 August 25, 2015 19:43
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) cfdonline2mohsen OpenFOAM 3 October 21, 2013 09:28
Fluent msh and cyclic boundary 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.