loading data of velocity components from a file(*.fld) or expression into user-defined arrays in Nektar++
******************* This email 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. ******************* Dear all, I want to load data of velocity components(u,v,w) from a file(*.fld) or expression into a user-defined array just like that in boundary conditions: <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="sin(PI*(x-t))" /> <REGION REF="1"> <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="sin(PI*(x-t))" FILE="bcsfromfiles_u_1.bc" /> </REGION> I wonder how it works. My purpose is to load the data into some arrays defined by myself like U[i], V[i], W[i] with the mesh data. Then I can use the data on each mesh point for further computation. Could you please tell me how to realize it with codes in Nektar++? I have check the codes in Explist.cpp, SessionReader.cpp, Conditions.cpp and IncNavierStokes.cpp but still have no idea. Many thanks, Zhaoyu Wang Shanghai Jiao Tong University
I'm interested in this too. I follow the responses. Thanks, Silvia ________________________________ From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of 王昭予 <clemden@sjtu.edu.cn> Sent: Friday, 29 May 2020 12:34 AM To: nektar-users <nektar-users@imperial.ac.uk> Subject: [Nektar-users] loading data of velocity components from a file(*.fld) or expression into user-defined arrays in Nektar++ ******************* This email 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<https://spam.ic.ac.uk/SpamConsole/Senders.aspx> to disable email stamping for this address. ******************* Dear all, I want to load data of velocity components(u,v,w) from a file(*.fld) or expression into a user-defined array just like that in boundary conditions: <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="sin(PI*(x-t))" /> <REGION REF="1"> <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="sin(PI*(x-t))" FILE="bcsfromfiles_u_1.bc" /> </REGION> I wonder how it works. My purpose is to load the data into some arrays defined by myself like U[i], V[i], W[i] with the mesh data. Then I can use the data on each mesh point for further computation. Could you please tell me how to realize it with codes in Nektar++? I have check the codes in Explist.cpp, SessionReader.cpp, Conditions.cpp and IncNavierStokes.cpp but still have no idea. Many thanks, Zhaoyu Wang Shanghai Jiao Tong University _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users<https://mailman.ic.ac.uk/mailman/listinfo/nektar-users>
Hi Zhaoyu and Silvia, I think you can load the data in the .fld file as a function, and then use the evaluate() function to evaluate the velocity data on specified points. You can find the use of FUNCTION in the user guide. For the evaluation on spatial points, you can refer to the Nektar++ doxygen http://doc.nektar.info/doxygen/latest/. Hope this helps, Tengfei Zhang From: Silvia Ceccacci (HDR) Date: 2020-06-01 08:54 To: 王昭予 CC: nektar-users@imperial.ac.uk Subject: Re: [Nektar-users] loading data of velocity components from a file(*.fld) or expression into user-defined arrays in Nektar++ I'm interested in this too. I follow the responses. Thanks, Silvia From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of 王昭予 <clemden@sjtu.edu.cn> Sent: Friday, 29 May 2020 12:34 AM To: nektar-users <nektar-users@imperial.ac.uk> Subject: [Nektar-users] loading data of velocity components from a file(*.fld) or expression into user-defined arrays in Nektar++ ******************* This email 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. ******************* Dear all, I want to load data of velocity components(u,v,w) from a file(*.fld) or expression into a user-defined array just like that in boundary conditions: <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="sin(PI*(x-t))" /> <REGION REF="1"> <D VAR="u" USERDEFINEDTYPE="TimeDependent" VALUE="sin(PI*(x-t))" FILE="bcsfromfiles_u_1.bc" /> </REGION> I wonder how it works. My purpose is to load the data into some arrays defined by myself like U[i], V[i], W[i] with the mesh data. Then I can use the data on each mesh point for further computation. Could you please tell me how to realize it with codes in Nektar++? I have check the codes in Explist.cpp, SessionReader.cpp, Conditions.cpp and IncNavierStokes.cpp but still have no idea. Many thanks, Zhaoyu Wang Shanghai Jiao Tong University _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
participants (3)
- 
                
                Silvia Ceccacci (HDR)
- 
                
                zhangtengfei@sjtu.edu.cn
- 
                
                王昭予