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

Generating real 3D data from axis symmetric wedge data for cone

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

Like Tree2Likes
  • 1 Post By GerhardHolzinger
  • 1 Post By mengge

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2019, 01:20
Default Generating real 3D data from axis symmetric wedge data for cone
  #1
Senior Member
 
TWB
Join Date: Mar 2009
Posts: 402
Rep Power: 19
quarkz is on a distinguished road
Hi,

I currently have data from an axis symmetric cone simulation, ran using the 1-cell thick wedge BC.

Now I would like to simulate real 3D cone. For simplification, it's going to be a quarter cone, with the xz and yz given symmetry BC. The axis of the cone is in the z direction.

I would like to use the data I got from the 2D wedge simulation and I wonder if it is possible to copy the 2D data to 3D, replicating each slice

The reason for going from 2D to 3D is because I am going from RANS to DES simulations. And I require the resumed data from the RANS result.
quarkz is offline   Reply With Quote

Old   October 10, 2019, 04:57
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
This should be quite easy. Just follow these steps:
  1. Map the data from the 2-D case to the 3-D case
  2. Rotate the 3-D simulation domains with an angle smaller than the wedge angle of the 2-D domain
  3. Continue with point 1 until this loop has been traversed a sufficient number of time, so that the whole 360 degrees of the 3-D domain have been covered.
GerhardHolzinger is offline   Reply With Quote

Old   July 26, 2021, 11:41
Default
  #3
New Member
 
mengge
Join Date: Feb 2020
Posts: 7
Rep Power: 6
mengge is on a distinguished road
Hi, have you successfully did it?
I followed Gerhard's method, but now there are some problems. In the first step, the mapping doesn't seem to get the correct results, as the print attached below.
Quote:
Originally Posted by GerhardHolzinger View Post
This should be quite easy. Just follow these steps:
  1. Map the data from the 2-D case to the 3-D case
  2. Rotate the 3-D simulation domains with an angle smaller than the wedge angle of the 2-D domain
  3. Continue with point 1 until this loop has been traversed a sufficient number of time, so that the whole 360 degrees of the 3-D domain have been covered.
Any suggestions would be appreciate. Thank you!

mengge is offline   Reply With Quote

Old   July 27, 2021, 07:18
Default
  #4
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
This looks quite reasonable. You can only map data between the 2D and the 3D case in places which are contained in both meshes.
That's why I formulated my recipe as a loop:

* map the data
* rotate the domain
* continue at the top, until the whole of the 3D domain has mapped data
GerhardHolzinger is offline   Reply With Quote

Old   July 28, 2021, 03:02
Default
  #5
New Member
 
mengge
Join Date: Feb 2020
Posts: 7
Rep Power: 6
mengge is on a distinguished road
Thanks! After the whole loop is done I've found that too. And this method does seem to be feasible!

Thanks again!
mengge is offline   Reply With Quote

Old   April 11, 2024, 04:44
Default
  #6
New Member
 
Join Date: Jul 2021
Location: United Kingdom
Posts: 5
Rep Power: 4
dylewiczk is on a distinguished road
Quote:
Originally Posted by mengge View Post
Thanks! After the whole loop is done I've found that too. And this method does seem to be feasible!

Thanks again!
Hey mengee,

It is great you got it working! I am trying to achieve the exact same thing but I am not sure how to execute the method GerhardHolzinger posted.

I have 2D field and when I simply apply mapFields to my fully 3D domain, then I have the same problem as you did previously (only small portion of the 3D mesh contains the solution).

I guess, I am not entirely sure on the 'rotate the mesh' part. How did you achieve that? Through rotateMesh? And how did you just continue doing the interpolation? Doesn't the new interpolation, after I rotated the mesh, overwrite the previous interpolation so I end up again only with small portion of the 3D mesh containing the solution?

Thanks!
dylewiczk is offline   Reply With Quote

Old   April 11, 2024, 04:52
Default
  #7
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Think of cutting a cake. You make the first cut (which reaches from the outer diameter of the cake to the center; unless you cut your cake with a sword, knifes generally found in kitches are roughly half the diameter of typical cakes).


Then, you rotate the cake a certain angle, the angle is depending on whether you want to get 8, 12, or 16 slices out of it, and you make another cut.


This goes on until the cake is fully sliced.






The 2D-to-3D mapping follows the same idea.


The initial mapping creates the first slice, then you need to rotate the 3D mesh a little onwards. The angle must not be larger than the angle of the 2D domain.
Following the rotation of the 3D mesh, the next mapping operation with create a new slice.
You continue this until you have covered the full 3D mesh.
GerhardHolzinger is offline   Reply With Quote

Old   April 11, 2024, 05:10
Default
  #8
New Member
 
Join Date: Jul 2021
Location: United Kingdom
Posts: 5
Rep Power: 4
dylewiczk is on a distinguished road
That makes perfect sense conceptually, what I am struggling with is how to do that in OpenFOAM. I cannot figure out the workflow that permits me doing the sequence of interpolation-rotation-interpolation-rotation-... until a whole domain is covered.

I was trying to combine mapFields and rotateMesh OpenFOAM functions but it did not get me far.

Do you have any suggestions on how to implement your method?
dylewiczk is offline   Reply With Quote

Old   April 11, 2024, 05:27
Default
  #9
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
You have two separate cases: the 2D case and the 3D case.
The 2D case has been run, and now you want the transfer the 2D data to the 3D case. Since, the 2D domain is a slice of the 3D domain, we should be able to geometrically "cover" the full 3D domain by rotating the 2D domain.



The tools, we use:



mapFields is a tool to map data from one case onto another case


transfortPoints is a tool to perform geometric manipulations on a case, e.g. rotate the whole domain by a certain angle





The sequence of operations



Here, we are performing a series of individual operations, one at a time.
Everything described here is done to the 3D case

  1. Map data from the 2D case
  2. Rotate the geometry by a small angle
  3. Goto 1 until you have completed a full circle







This is the script I created back then to map the data from an axi-symmetric case onto a 3D case.


Note, that we have two case-folders: axiSym and full3d. The respective names make it clear, which is which. The script below, is part of the full3d case, if that's not obvious.



Code:
#!/bin/bash
cd ${0%/*} || exit 1    # Run from this directory


# for-loop syntax:
# for VAR in {START..STOP..INCREMENT}
for i in {0..193..1}
do
    echo "Performing step $i"

    # transformPoints -rollPitchYaw <vector>
    #   transform in terms of '(roll pitch yaw)' in degrees

    # 360 degrees / 193 = 1.865284974 degrees

    transformPoints -rollPitchYaw '(1.8653 0 0)'

    mapFields -sourceTime latestTime ../axiSym
done
dylewiczk likes this.
GerhardHolzinger is offline   Reply With Quote

Old   April 11, 2024, 05:32
Default
  #10
New Member
 
mengge
Join Date: Feb 2020
Posts: 7
Rep Power: 6
mengge is on a distinguished road
Hi,
It's been quite a while, and I can't even find that case. But I think I should have achieved it through 'rotateMesh', rotating the 3D domain axially with an angle smaller than the wedge angle as GerhardHolzinger said.
'rotateMesh' rotates the mesh along with the field data, so the next mapping will map the 2D results into the empty part of the 3D domain, without overwriting the previous one.
So after all the loops are done with suitable angles, you should obtain the complete 3D results.
dylewiczk likes this.
mengge is offline   Reply With Quote

Old   April 11, 2024, 17:46
Default
  #11
New Member
 
Join Date: Jul 2021
Location: United Kingdom
Posts: 5
Rep Power: 4
dylewiczk is on a distinguished road
Thanks for your help! I have managed to do the interpolation and successfully run the 3D case.

I think it is worth adding for other people who come across this thread in the future that, at least in my case, I had to fix BCs after interpolation as they got messed up but this could be problem specific to my two geometries.
dylewiczk is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can udf plays the role of excel fan-violaine Fluent UDF and Scheme Programming 2 February 18, 2019 11:01
[Other] Mesh for 2D axis symmetric wedge domain with stenosis yy205001 OpenFOAM Meshing & Mesh Conversion 4 April 18, 2016 10:32
how to hook this udf shanu FLUENT 1 August 26, 2011 10:48
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27
udf error Rashmi FLUENT 0 December 27, 2005 05:35


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