hwo to change the name of variables in the output *.vtu file
Dear professor: In the vtu file, the u and v velocity must have name MomentumX and MomentumY, How to resolve this. Regards. ztdepyahoo@163.com
Hello, maybe the section "remapping variable names" in the user-guide can help you to solve your problem. Best regards Fabian ________________________________ Von: nektar-users-bounces@imperial.ac.uk [nektar-users-bounces@imperial.ac.uk]" im Auftrag von "ztdepyahoo@163.com [ztdepyahoo@163.com] Gesendet: Sonntag, 13. November 2016 07:30 An: nektar-users Betreff: [Nektar-users] hwo to change the name of variables in the output *.vtu file Dear professor: In the vtu file, the u and v velocity must have name MomentumX and MomentumY, How to resolve this. Regards. ________________________________ ztdepyahoo@163.com
Hi Fabian, That sounds a possibility. I have to confess I did not know about that option! Cheers, Spencer. On 14 Nov 2016, at 22:05, Selbach, Fabian <fabian.selbach@student.uni-siegen.de<mailto:fabian.selbach@student.uni-siegen.de>> wrote: Hello, maybe the section "remapping variable names" in the user-guide can help you to solve your problem. Best regards Fabian ________________________________ Von: nektar-users-bounces@imperial.ac.uk<mailto:nektar-users-bounces@imperial.ac.uk> [nektar-users-bounces@imperial.ac.uk<mailto:nektar-users-bounces@imperial.ac.uk>]" im Auftrag von "ztdepyahoo@163.com<mailto:ztdepyahoo@163.com> [ztdepyahoo@163.com<mailto:ztdepyahoo@163.com>] Gesendet: Sonntag, 13. November 2016 07:30 An: nektar-users Betreff: [Nektar-users] hwo to change the name of variables in the output *.vtu file Dear professor: In the vtu file, the u and v velocity must have name MomentumX and MomentumY, How to resolve this. Regards. ________________________________ ztdepyahoo@163.com<mailto:ztdepyahoo@163.com> _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users 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
Hi, I am not sure if what is in the user-guide would work, since it seems to only handle functions (e.g. for initial conditions). Although this is not very elegant, changing the variable names directly inside the fld files works for me. For example, for the output of a serial simulation you could run in the command-line sed -i -e 's/"u,v,p"/"MomentumX,MomentumY,p"/g' solution.fld and for a parallel simulation sed -i -e 's/"u,v,p"/"MomentumX,MomentumY,p"/g' solution.fld/*.fld where solution.fld is the file you want to modify. Cheers, Douglas ________________________________ From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of Sherwin, Spencer J <s.sherwin@imperial.ac.uk> Sent: 14 November 2016 22:20:43 To: Selbach, Fabian Cc: nektar-users Subject: Re: [Nektar-users] hwo to change the name of variables in the output *.vtu file Hi Fabian, That sounds a possibility. I have to confess I did not know about that option! Cheers, Spencer. On 14 Nov 2016, at 22:05, Selbach, Fabian <fabian.selbach@student.uni-siegen.de<mailto:fabian.selbach@student.uni-siegen.de>> wrote: Hello, maybe the section "remapping variable names" in the user-guide can help you to solve your problem. Best regards Fabian ________________________________ Von: nektar-users-bounces@imperial.ac.uk<mailto:nektar-users-bounces@imperial.ac.uk> [nektar-users-bounces@imperial.ac.uk<mailto:nektar-users-bounces@imperial.ac.uk>]" im Auftrag von "ztdepyahoo@163.com<mailto:ztdepyahoo@163.com> [ztdepyahoo@163.com<mailto:ztdepyahoo@163.com>] Gesendet: Sonntag, 13. November 2016 07:30 An: nektar-users Betreff: [Nektar-users] hwo to change the name of variables in the output *.vtu file Dear professor: In the vtu file, the u and v velocity must have name MomentumX and MomentumY, How to resolve this. Regards. ________________________________ ztdepyahoo@163.com<mailto:ztdepyahoo@163.com> _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users 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
If you are working with vtu files. You can load data file into paraview and add new variables. you can even do magu = u+v at every point and save it as new vtu file. check out the calculator symbol button in paraview. Ashok On Monday, November 14, 2016, Serson, Douglas <d.serson14@imperial.ac.uk> wrote:
Hi,
I am not sure if what is in the user-guide would work, since it seems to only handle functions (e.g. for initial conditions).
Although this is not very elegant, changing the variable names directly inside the fld files works for me.
For example, for the output of a serial simulation you could run in the command-line
sed -i -e 's/"u,v,p"/"MomentumX,MomentumY,p"/g' solution.fld
and for a parallel simulation
sed -i -e 's/"u,v,p"/"MomentumX,MomentumY,p"/g' solution.fld/*.fld
where solution.fld is the file you want to modify.
Cheers,
Douglas
------------------------------ *From:* nektar-users-bounces@imperial.ac.uk <javascript:_e(%7B%7D,'cvml','nektar-users-bounces@imperial.ac.uk');> < nektar-users-bounces@imperial.ac.uk <javascript:_e(%7B%7D,'cvml','nektar-users-bounces@imperial.ac.uk');>> on behalf of Sherwin, Spencer J <s.sherwin@imperial.ac.uk <javascript:_e(%7B%7D,'cvml','s.sherwin@imperial.ac.uk');>> *Sent:* 14 November 2016 22:20:43 *To:* Selbach, Fabian *Cc:* nektar-users *Subject:* Re: [Nektar-users] hwo to change the name of variables in the output *.vtu file
Hi Fabian,
That sounds a possibility. I have to confess I did not know about that option!
Cheers, Spencer.
On 14 Nov 2016, at 22:05, Selbach, Fabian <fabian.selbach@student.uni- siegen.de <javascript:_e(%7B%7D,'cvml','fabian.selbach@student.uni-siegen.de');>> wrote:
Hello, maybe the section "remapping variable names" in the user-guide can help you to solve your problem. Best regards Fabian ------------------------------ *Von:* nektar-users-bounces@imperial.ac.uk <javascript:_e(%7B%7D,'cvml','nektar-users-bounces@imperial.ac.uk');> [ nektar-users-bounces@imperial.ac.uk <javascript:_e(%7B%7D,'cvml','nektar-users-bounces@imperial.ac.uk');>]" im Auftrag von "ztdepyahoo@163.com <javascript:_e(%7B%7D,'cvml','ztdepyahoo@163.com');> [ztdepyahoo@163.com <javascript:_e(%7B%7D,'cvml','ztdepyahoo@163.com');>] *Gesendet:* Sonntag, 13. November 2016 07:30 *An:* nektar-users *Betreff:* [Nektar-users] hwo to change the name of variables in the output *.vtu file
Dear professor: In the vtu file, the u and v velocity must have name MomentumX and MomentumY, How to resolve this. Regards.
------------------------------ ztdepyahoo@163.com <javascript:_e(%7B%7D,'cvml','ztdepyahoo@163.com');> _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk <javascript:_e(%7B%7D,'cvml','Nektar-users@imperial.ac.uk');> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
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 <javascript:_e(%7B%7D,'cvml','s.sherwin@imperial.ac.uk');> +44 (0) 20 759 45052
participants (5)
- 
                
                ashok jallepalli
- 
                
                Selbach, Fabian
- 
                
                Serson, Douglas
- 
                
                Sherwin, Spencer J
- 
                
                ztdepyahoo@163.com