Generating real 3D data from axis symmetric wedge data for cone
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. |
This should be quite easy. Just follow these steps:
|
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:
https://i.loli.net/2021/07/26/LKardTpoXD3myvu.png https://i.loli.net/2021/07/26/49UYNodvbJiglLt.png |
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 |
Thanks! After the whole loop is done I've found that too. And this method does seem to be feasible!
https://z3.ax1x.com/2021/07/28/WTinu6.png Thanks again! |
Quote:
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! |
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. |
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? |
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
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 |
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. |
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. |
All times are GMT -4. The time now is 12:18. |