ExpList::SmoothField produces artifacts
Dear all, I want to create a C0-continuous field from interpolated input data. The input field is obtained from a FVM code and was filtered with a gaussian in space and interpolated to the quadrature points. I store the field in a ContField2D m_bf = Array<OneD, MultiRegions::ExpListSharedPtr>(m_spacedim + 2); m_bf[i] = MemoryManager<MultiRegions::ContField2D>::AllocateSharedPtr(m_session, m_graph); copy the interpolated data into its m_phys array Vmath::Vcopy(nq, filteredField[i], 1, m_bf[i]->UpdatePhys(), 1); and then try to smooth the field. Until now, i just did: m_bf[i]->IProductWRTBase(m_bf[i]->GetPhys(), m_bf[i]->UpdateCoeffs()); m_bf[i]->MultiplyByElmtInvMass(m_bf[i]->GetCoeffs(), m_bf[i]->UpdateCoeffs()); m_bf[i]->BwdTrans(m_bf[i]->GetCoeffs(), m_bf[i]->UpdatePhys()); which yields the field depicted in DG.png. However, this does not ensure C0- continuity, so i tried to call ExpList::SmoothField afterward: m_bf[i]->SmoothField(m_bf[i]->UpdatePhys()); However, this produces a distorted field as shown in smoothed.png. I am using a 6th order modified expansion basis: <E COMPOSITE="C[10]" NUMMODES="6" FIELDS="p,u,v,w" TYPE="MODIFIED"/> and the mesh is depicted in smoothed_mesh.png. What is the cause of this problem and what can i do do fix it? Cheers, Kilian -- Kilian Lackhove, M.Sc. Fachgebiet für Energie- und Kraftwerkstechnik L1|08 114 Technische Universität Darmstadt Jovanka-Bontschits-Straße 2 D-64287 Darmstadt Germany Tel.: +49 6151 16 - 28915 Fax: +49 6151 16 - 6555 e-mail: lackhove@ekt.tu-darmstadt.de
Hi Killian, I do not recall what smooth field does. I think the method may only be suitable for nodal quads. To make a C0 projection you should use Fwdtrans and then Bwdtrans. Actually there is a module to do this in fieldconvert so you might wish to look at that too? We have also been doing a similar interpolation on other projects. In a branch we have a method to import points at quadrature spacing and then create a .fld file. When we next get a chance we discuss this further. Cheers Spencer Sent from my iPhone
On 21 Jan 2016, at 13:50, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de> wrote:
Dear all,
I want to create a C0-continuous field from interpolated input data. The input field is obtained from a FVM code and was filtered with a gaussian in space and interpolated to the quadrature points. I store the field in a ContField2D
m_bf = Array<OneD, MultiRegions::ExpListSharedPtr>(m_spacedim + 2); m_bf[i] = MemoryManager<MultiRegions::ContField2D>::AllocateSharedPtr(m_session, m_graph);
copy the interpolated data into its m_phys array
Vmath::Vcopy(nq, filteredField[i], 1, m_bf[i]->UpdatePhys(), 1);
and then try to smooth the field. Until now, i just did:
m_bf[i]->IProductWRTBase(m_bf[i]->GetPhys(), m_bf[i]->UpdateCoeffs()); m_bf[i]->MultiplyByElmtInvMass(m_bf[i]->GetCoeffs(), m_bf[i]->UpdateCoeffs()); m_bf[i]->BwdTrans(m_bf[i]->GetCoeffs(), m_bf[i]->UpdatePhys());
which yields the field depicted in DG.png. However, this does not ensure C0- continuity, so i tried to call ExpList::SmoothField afterward:
m_bf[i]->SmoothField(m_bf[i]->UpdatePhys());
However, this produces a distorted field as shown in smoothed.png.
I am using a 6th order modified expansion basis: <E COMPOSITE="C[10]" NUMMODES="6" FIELDS="p,u,v,w" TYPE="MODIFIED"/>
and the mesh is depicted in smoothed_mesh.png.
What is the cause of this problem and what can i do do fix it?
Cheers,
Kilian
-- Kilian Lackhove, M.Sc. Fachgebiet für Energie- und Kraftwerkstechnik L1|08 114 Technische Universität Darmstadt Jovanka-Bontschits-Straße 2 D-64287 Darmstadt Germany
Tel.: +49 6151 16 - 28915 Fax: +49 6151 16 - 6555 e-mail: lackhove@ekt.tu-darmstadt.de <DG.png> <smoothed_mesh.png> <smoothed.png> _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Hi Spencer, Thank you for the quick reply. ExpList::SmoothField is exactly the same as callinf FwdTrans and bwdTrans, which is what the FieldCovert module does, too. Finding out what that caused these strange patterns took me a while, but i figured it out at last. It was a bug in my code, SmoothField as well as the method you suggested work fine! Cheers, Kilian Am Donnerstag, 21. Januar 2016, 14:42:39 schrieb Sherwin, Spencer J:
Hi Killian,
I do not recall what smooth field does. I think the method may only be suitable for nodal quads.
To make a C0 projection you should use Fwdtrans and then Bwdtrans. Actually there is a module to do this in fieldconvert so you might wish to look at that too?
We have also been doing a similar interpolation on other projects. In a branch we have a method to import points at quadrature spacing and then create a .fld file. When we next get a chance we discuss this further.
Cheers Spencer
Sent from my iPhone
On 21 Jan 2016, at 13:50, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de> wrote:
Dear all,
I want to create a C0-continuous field from interpolated input data. The input field is obtained from a FVM code and was filtered with a gaussian in space and interpolated to the quadrature points. I store the field in a ContField2D
m_bf = Array<OneD, MultiRegions::ExpListSharedPtr>(m_spacedim + 2); m_bf[i] = MemoryManager<MultiRegions::ContField2D>::AllocateSharedPtr(m_session, m_graph);
copy the interpolated data into its m_phys array
Vmath::Vcopy(nq, filteredField[i], 1, m_bf[i]->UpdatePhys(), 1);
and then try to smooth the field. Until now, i just did:
m_bf[i]->IProductWRTBase(m_bf[i]->GetPhys(), m_bf[i]->UpdateCoeffs()); m_bf[i]->MultiplyByElmtInvMass(m_bf[i]->GetCoeffs(), m_bf[i]->UpdateCoeffs()); m_bf[i]->BwdTrans(m_bf[i]->GetCoeffs(), m_bf[i]->UpdatePhys());
which yields the field depicted in DG.png. However, this does not ensure C0- continuity, so i tried to call ExpList::SmoothField afterward:
m_bf[i]->SmoothField(m_bf[i]->UpdatePhys());
However, this produces a distorted field as shown in smoothed.png.
I am using a 6th order modified expansion basis: <E COMPOSITE="C[10]" NUMMODES="6" FIELDS="p,u,v,w" TYPE="MODIFIED"/>
and the mesh is depicted in smoothed_mesh.png.
What is the cause of this problem and what can i do do fix it?
Cheers,
Kilian -- Kilian Lackhove, M.Sc. Fachgebiet für Energie- und Kraftwerkstechnik L1|08 114 Technische Universität Darmstadt Jovanka-Bontschits-Straße 2 D-64287 Darmstadt Germany
Tel.: +49 6151 16 - 28915 Fax: +49 6151 16 - 6555 e-mail: lackhove@ekt.tu-darmstadt.de
If you need to smooth things even further we have also been looking at Helmholtz type smoother recently. Cheers, Spencer. On 29 Jan 2016, at 12:34, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de<mailto:lackhove@ekt.tu-darmstadt.de>> wrote: Hi Spencer, Thank you for the quick reply. ExpList::SmoothField is exactly the same as callinf FwdTrans and bwdTrans, which is what the FieldCovert module does, too. Finding out what that caused these strange patterns took me a while, but i figured it out at last. It was a bug in my code, SmoothField as well as the method you suggested work fine! Cheers, Kilian Am Donnerstag, 21. Januar 2016, 14:42:39 schrieb Sherwin, Spencer J: Hi Killian, I do not recall what smooth field does. I think the method may only be suitable for nodal quads. To make a C0 projection you should use Fwdtrans and then Bwdtrans. Actually there is a module to do this in fieldconvert so you might wish to look at that too? We have also been doing a similar interpolation on other projects. In a branch we have a method to import points at quadrature spacing and then create a .fld file. When we next get a chance we discuss this further. Cheers Spencer Sent from my iPhone On 21 Jan 2016, at 13:50, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de<mailto:lackhove@ekt.tu-darmstadt.de>> wrote: Dear all, I want to create a C0-continuous field from interpolated input data. The input field is obtained from a FVM code and was filtered with a gaussian in space and interpolated to the quadrature points. I store the field in a ContField2D m_bf = Array<OneD, MultiRegions::ExpListSharedPtr>(m_spacedim + 2); m_bf[i] = MemoryManager<MultiRegions::ContField2D>::AllocateSharedPtr(m_session, m_graph); copy the interpolated data into its m_phys array Vmath::Vcopy(nq, filteredField[i], 1, m_bf[i]->UpdatePhys(), 1); and then try to smooth the field. Until now, i just did: m_bf[i]->IProductWRTBase(m_bf[i]->GetPhys(), m_bf[i]->UpdateCoeffs()); m_bf[i]->MultiplyByElmtInvMass(m_bf[i]->GetCoeffs(), m_bf[i]->UpdateCoeffs()); m_bf[i]->BwdTrans(m_bf[i]->GetCoeffs(), m_bf[i]->UpdatePhys()); which yields the field depicted in DG.png. However, this does not ensure C0- continuity, so i tried to call ExpList::SmoothField afterward: m_bf[i]->SmoothField(m_bf[i]->UpdatePhys()); However, this produces a distorted field as shown in smoothed.png. I am using a 6th order modified expansion basis: <E COMPOSITE="C[10]" NUMMODES="6" FIELDS="p,u,v,w" TYPE="MODIFIED"/> and the mesh is depicted in smoothed_mesh.png. What is the cause of this problem and what can i do do fix it? Cheers, Kilian -- Kilian Lackhove, M.Sc. Fachgebiet für Energie- und Kraftwerkstechnik L1|08 114 Technische Universität Darmstadt Jovanka-Bontschits-Straße 2 D-64287 Darmstadt Germany Tel.: +49 6151 16 - 28915 Fax: +49 6151 16 - 6555 e-mail: lackhove@ekt.tu-darmstadt.de<mailto:lackhove@ekt.tu-darmstadt.de> Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
That sounds very interesting. Can you point me to where this smoother is used? I found several smoothing routines, but none of them relies on the Helmholtz solver. Cheers, Kilian Am Freitag, 29. Januar 2016, 17:41:45 schrieb Sherwin, Spencer J:
If you need to smooth things even further we have also been looking at Helmholtz type smoother recently.
Cheers, Spencer.
On 29 Jan 2016, at 12:34, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de<mailto:lackhove@ekt.tu-darmstadt.de>> wrote:
Hi Spencer,
Thank you for the quick reply. ExpList::SmoothField is exactly the same as callinf FwdTrans and bwdTrans, which is what the FieldCovert module does, too. Finding out what that caused these strange patterns took me a while, but i figured it out at last. It was a bug in my code, SmoothField as well as the method you suggested work fine!
Cheers,
Kilian
Am Donnerstag, 21. Januar 2016, 14:42:39 schrieb Sherwin, Spencer J: Hi Killian,
I do not recall what smooth field does. I think the method may only be suitable for nodal quads.
To make a C0 projection you should use Fwdtrans and then Bwdtrans. Actually there is a module to do this in fieldconvert so you might wish to look at that too?
We have also been doing a similar interpolation on other projects. In a branch we have a method to import points at quadrature spacing and then create a .fld file. When we next get a chance we discuss this further.
Cheers Spencer
Sent from my iPhone
On 21 Jan 2016, at 13:50, Kilian Lackhove <lackhove@ekt.tu-darmstadt.de<mailto:lackhove@ekt.tu-darmstadt.de>> wrote:
Dear all,
I want to create a C0-continuous field from interpolated input data. The input field is obtained from a FVM code and was filtered with a gaussian in space and interpolated to the quadrature points. I store the field in a ContField2D
m_bf = Array<OneD, MultiRegions::ExpListSharedPtr>(m_spacedim + 2); m_bf[i] = MemoryManager<MultiRegions::ContField2D>::AllocateSharedPtr(m_session, m_graph);
copy the interpolated data into its m_phys array
Vmath::Vcopy(nq, filteredField[i], 1, m_bf[i]->UpdatePhys(), 1);
and then try to smooth the field. Until now, i just did:
m_bf[i]->IProductWRTBase(m_bf[i]->GetPhys(), m_bf[i]->UpdateCoeffs()); m_bf[i]->MultiplyByElmtInvMass(m_bf[i]->GetCoeffs(), m_bf[i]->UpdateCoeffs()); m_bf[i]->BwdTrans(m_bf[i]->GetCoeffs(), m_bf[i]->UpdatePhys());
which yields the field depicted in DG.png. However, this does not ensure C0- continuity, so i tried to call ExpList::SmoothField afterward:
m_bf[i]->SmoothField(m_bf[i]->UpdatePhys());
However, this produces a distorted field as shown in smoothed.png.
I am using a 6th order modified expansion basis: <E COMPOSITE="C[10]" NUMMODES="6" FIELDS="p,u,v,w" TYPE="MODIFIED"/>
and the mesh is depicted in smoothed_mesh.png.
What is the cause of this problem and what can i do do fix it?
Cheers,
Kilian -- Kilian Lackhove, M.Sc. Fachgebiet für Energie- und Kraftwerkstechnik L1|08 114 Technische Universität Darmstadt Jovanka-Bontschits-Straße 2 D-64287 Darmstadt Germany
Tel.: +49 6151 16 - 28915 Fax: +49 6151 16 - 6555 e-mail: lackhove@ekt.tu-darmstadt.de<mailto:lackhove@ekt.tu-darmstadt.de>
Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ
s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052
-- Kilian Lackhove, M.Sc. Fachgebiet für Energie- und Kraftwerkstechnik L1|08 114 Technische Universität Darmstadt Jovanka-Bontschits-Straße 2 D-64287 Darmstadt Germany Tel.: +49 6151 16 - 28915 Fax: +49 6151 16 - 6555 e-mail: lackhove@ekt.tu-darmstadt.de
participants (2)
-
Kilian Lackhove
-
Sherwin, Spencer J