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

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

 October 9, 2019, 01:20 Generating real 3D data from axis symmetric wedge data for cone #1 Senior Member   TWB Join Date: Mar 2009 Posts: 402 Rep Power: 19 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.

 October 10, 2019, 04:57 #2 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 This should be quite easy. Just follow these steps: Map the data from the 2-D case to the 3-D case Rotate the 3-D simulation domains with an angle smaller than the wedge angle of the 2-D domain 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.

July 26, 2021, 11:41
#3
New Member

mengge
Join Date: Feb 2020
Posts: 7
Rep Power: 6
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 This should be quite easy. Just follow these steps: Map the data from the 2-D case to the 3-D case Rotate the 3-D simulation domains with an angle smaller than the wedge angle of the 2-D domain 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！

 July 27, 2021, 07:18 #4 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 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

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

April 11, 2024, 04:44
#6
New Member

Join Date: Jul 2021
Location: United Kingdom
Posts: 5
Rep Power: 4
Quote:
 Originally Posted by mengge 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!

 April 11, 2024, 04:52 #7 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 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.

 April 11, 2024, 05:10 #8 New Member   Join Date: Jul 2021 Location: United Kingdom Posts: 5 Rep Power: 4 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?

 April 11, 2024, 05:27 #9 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 339 Rep Power: 28 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 Map data from the 2D case Rotate the geometry by a small angle 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 # 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.

 April 11, 2024, 05:32 #10 New Member   mengge Join Date: Feb 2020 Posts: 7 Rep Power: 6 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.

 April 11, 2024, 17:46 #11 New Member   Join Date: Jul 2021 Location: United Kingdom Posts: 5 Rep Power: 4 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.