Dear Elmer community,
I am dealing with the following problem; I managed to solve a rather complex conjugate heat transfer model in 2D axial symmetry, which gives me the radial and axial flow velocities as well as the spatial temperature distribution. Now, I would like to trace particles in these fields, using the Particle Tracking solver in full 3D (particles coming from one side, intersect the flow and exit the domain).
Therefore, my question is: is it possible to use a result of 2D axisymmetrical simulation and convert the data to 3D geometry, in which I will then trace the particles? I can easily create a 3D mesh of the same geometry by revolving and meshing it in SALOME But I don't know how to "revolve" the 2D data and map it onto the 3D mesh.
Thank you very much for any advice
Adam
Loading 2D axi data to 3D
Re: Loading 2D axi data to 3D
Hi Adamo,
I would try to do the rotation in ParaView. There is a "rotational extrusion" filter which you could check out (I have never used it myself, though). If you have difficulties, the ParaView mailing list and/or their forum is there to help.
To get the values into Elmer, you could store them in an ASCII file and use the include command, as discussed here: viewtopic.php?f=3&t=4249
HTH,
Matthias
I would try to do the rotation in ParaView. There is a "rotational extrusion" filter which you could check out (I have never used it myself, though). If you have difficulties, the ParaView mailing list and/or their forum is there to help.
To get the values into Elmer, you could store them in an ASCII file and use the include command, as discussed here: viewtopic.php?f=3&t=4249
HTH,
Matthias
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Loading 2D axi data to 3D
Hi Adamo,
In Elmer there is currently no dedicated module to map 2D results to 3D. There is the opposite the module ProjectToPlane.F90 (ch. 58 in Models Manual) but it is of course of not much use here. Mapping from 2D to 3D would infact be easier but it just hasn't been done. Hence I would agree with Matthias that this would be most conveniently done in Paraview.
-Peter
In Elmer there is currently no dedicated module to map 2D results to 3D. There is the opposite the module ProjectToPlane.F90 (ch. 58 in Models Manual) but it is of course of not much use here. Mapping from 2D to 3D would infact be easier but it just hasn't been done. Hence I would agree with Matthias that this would be most conveniently done in Paraview.
-Peter
Re: Loading 2D axi data to 3D
Hi Matthias and Peter,
thank you for the answers. However, I think you are referring to the Rotational Extrusion filter in ParaView https://www.paraview.org/ParaView/Doc/N ... usion.html . This filter, however, "forms a surface by rotating the input about the Z axis" so I do not get a volume data from it.
Nonetheless, I have devised a simple python script that converts my 2D cylindrical velocities to revolved 3D cartesian (x,y,z,Vx,Vy,Vz,rho). Is there a way to import this scatter velocity data to the ParticleTracking solver and let the solver use them as the background field? I either need to load them as an initial condition to a Navier-Stokes solver which will then not run or do I specify the environment velocity for the Particle Tracker somewhere else?
Thank you very much
Adam
thank you for the answers. However, I think you are referring to the Rotational Extrusion filter in ParaView https://www.paraview.org/ParaView/Doc/N ... usion.html . This filter, however, "forms a surface by rotating the input about the Z axis" so I do not get a volume data from it.
Nonetheless, I have devised a simple python script that converts my 2D cylindrical velocities to revolved 3D cartesian (x,y,z,Vx,Vy,Vz,rho). Is there a way to import this scatter velocity data to the ParticleTracking solver and let the solver use them as the background field? I either need to load them as an initial condition to a Navier-Stokes solver which will then not run or do I specify the environment velocity for the Particle Tracker somewhere else?
Thank you very much
Adam
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Loading 2D axi data to 3D
Hi Adam,
The challenge is that the only supported way how Elmer reads in fields accurately is the "Restart File" option which is married with a particular mesh. So if you have generated 3D velocity values yourself it is difficult to use them as such.
You could take a value table in style [x y z f] in using DataToField module. This fits the data so your data would not need to be even conforming. Using this for the whole vector field might be cumbersome. I don't remember whether this supports vectors/several components.
The Particle machinery expects that you can give the name of a vector field where the different components are [v_x v_y v_z].
-Peter
The challenge is that the only supported way how Elmer reads in fields accurately is the "Restart File" option which is married with a particular mesh. So if you have generated 3D velocity values yourself it is difficult to use them as such.
You could take a value table in style [x y z f] in using DataToField module. This fits the data so your data would not need to be even conforming. Using this for the whole vector field might be cumbersome. I don't remember whether this supports vectors/several components.
The Particle machinery expects that you can give the name of a vector field where the different components are [v_x v_y v_z].
-Peter
Re: Loading 2D axi data to 3D
I see, thanks. I did try with the DataToField solver which I did not manage to get to work (probably some silly mistake since it keeps saying WARNING:: LocateParticleInMeshOctree: Could not locate particle in the mesh!) but even if I did, it would not help me in loading a vector field.
So if I may have another follow-up question - I can get VTK or ASCII data in the points of the 3D mesh that I want to use for the calculation (using paraView). Would it be easier to load such a VTK or ASCII file, i.e. no interpolation would be needed on Elmer side, I just need to find the nearest point (identical point up to machine tolerance)
Thank you
Adam
So if I may have another follow-up question - I can get VTK or ASCII data in the points of the 3D mesh that I want to use for the calculation (using paraView). Would it be easier to load such a VTK or ASCII file, i.e. no interpolation would be needed on Elmer side, I just need to find the nearest point (identical point up to machine tolerance)
Thank you
Adam
-
- Site Admin
- Posts: 4841
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Loading 2D axi data to 3D
Hi Adam,
I did some minor tweaking of the code such that one can use a 2D axisymmetric case to have an initial guess in 3D cartesian coordinates.
There is now an example as test case "NonconformingRestart4" that demonstrates how this could be done for a scalar field. I recognize there are still some steps needed for what you intend to do but I think this feature may have more general appeal and was hanging reasonably low.
-Peter
PS. If you're using precompiled version of Elmer you need to wait for the nightly builds.
I did some minor tweaking of the code such that one can use a 2D axisymmetric case to have an initial guess in 3D cartesian coordinates.
There is now an example as test case "NonconformingRestart4" that demonstrates how this could be done for a scalar field. I recognize there are still some steps needed for what you intend to do but I think this feature may have more general appeal and was hanging reasonably low.
-Peter
PS. If you're using precompiled version of Elmer you need to wait for the nightly builds.
Re: Loading 2D axi data to 3D
Matthias,mzenker wrote: ↑26 Jul 2018, 18:35
I would try to do the rotation in ParaView. There is a "rotational extrusion" filter which you could check out (I have never used it myself, though). If you have difficulties, the ParaView mailing list and/or their forum is there to help.
To get the values into Elmer, you could store them in an ASCII file and use the include command, as discussed here: viewtopic.php?f=3&t=4249
I have read here (https://www.paraview.org/ParaView/Doc/N ... usion.html) that the rotation to 3D is possible around z axis only (of paraview). So, if that(z-axis of paraview coordinates) is the case it can be rotated , but for a random rotation from 2D to 3D, something needs to be done in the postprocessing solvers of ElmerSolver to convert 2D data to 3D within Elmer's domain , and visualize the 3D image in paraview.
Yours Sincerely,
Anil Kunwar
Anil Kunwar
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Faculty of Mechanical Engineering, Silesian University of Technology, Gliwice
Re: Loading 2D axi data to 3D
... or else the ParaView rotation could be extended. Since ParaView filters can be programmed in Python, that could be the easier way...
Matthias
Matthias
Re: Loading 2D axi data to 3D
Thank you very much for implementing this feature Peter! I'll give it a try and I hope it won't be useful just to me .
As for the DataToField solver, I just had some routine mistakes there but it seems to be working fine as well. I think I will now try to reverse-engineer it to be able to import vectors and will post it here if I get any success .
Adam
As for the DataToField solver, I just had some routine mistakes there but it seems to be working fine as well. I think I will now try to reverse-engineer it to be able to import vectors and will post it here if I get any success .
Adam