Hi Guillermo, What you describe is for sure possible, without additional coding. I did that, just some time ago, so might not remember the exact solution. FieldConvert has a homstretch module, have you tried it? I think it does just this. Best regards, Stanisław Gepner, Ph.D. *Faculty of Power and Aeronautical Engineering* Nowowiejska 21/25 Str. 00-665 Warsaw, Poland phone +48 (22) 234 51 70 <https://www.pw.edu.pl/engpw> On 22.12.2022 13:38, Guillermo Suárez wrote:
This email from guillermo180395@gmail.com originates from outside Imperial. Do not click on links and attachments unless you recognise the sender. If you trust the sender, add them to your safe senders list <https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address.
Hi,
I have a 2.5D solution (2D in the x-y plane with Fourier expansion in the z direction) run with the incompressible Navier-Stokes solver and I need to replicate it N times in the homogeneous direction. If the solution has HomModesZ for an extension LZ, I need the new solution to fit N replica in an extension N*LZ with a resolution N*HomModesZ. I have tried several modules of FieldConvert, but rather than N replicas of the original solution, the result I get is a stretched version of it.
In principle this should be a very simple thing to do, as the coefficients of mode k of the original solution should be copied to mode k*N of the new solution, leaving all modes that are not multiples of N empty (zeroes). The trouble is that implementing this requires an understanding of how modes are labeled and I don't manage to get the hold of it. For a simple 1D-periodic solution whose Fourier expansion modes are saved in a sequential complex array, replicating three times would be as simple as:
A_original = {a0, a1, a2, a3, ..., an}
A_new = {a0, 0, 0, a1, 0, 0, a2, 0, 0, a3, ..., 0, 0, an}
Could someone please give me some hints as to how to implement this? Perhaps an existing module that I can take as a reference and the sort of changes that could get the intended result? I believe this would not take more than a few minutes for someone that is familiar with the code. Perhaps someone acquainted with the working can help me implement such a replication module for FieldConvert?
Thank you.
Cheers,
Guillermo
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users