Hi Stanisław,
Thank you for your reply. I use the mcf file in the NekMesh utility while meshing. What I intended was to have a file named parameters.dat (or just parameters) in the following format (or something similar):L 1.0; // or L = 1.0;nu 1.0e+00;Re 1.0e+03;
These will serve as parameters for meshing and the solver. Inside e.g. session.xml I want to have something like:#include "parameters"...<P> U = Re*nu/L </P>
...
Having the problem parameters (such as Reynolds number, viscosity, mesh size, etc.) in one file eases my job and makes it easier to handle more cases just by changing one parameter in one file. I use this kind of methodology in OpenFOAM. There, the dictionaries (or xml files in this case) accept C++ like format. I am wondering if something similar is possible in Nektar++.
Right now, in my case I have mesh.xml generated by NekMesh which uses mesh.mcf. In the end I will still use IncNavierStokesSolver mesh.xml session.xml command. So, both mesh.mcf and session.xml will have something like #include "parameters" inside them, and hence use parameters file. Implementing this inside session.xml is more critical for me, as I am thinking of switching to gmsh for meshing (which supports what I want),
Thank you for the help.
Cheers,Ilteber
--
İlteber R. Özdemir
On Wed, 13 Jul 2022 at 02:11, Stanislaw Gepner <stanislaw.gepner@pw.edu.pl> wrote:
_______________________________________________Hi Ilteber,
I am not sure about the mcf files. Are those used as Nektar++ session files? I normally deal with xml format.
So I think you can not (but see below) do what you intend (simply). You can split the geometry and the session xml files into to separate files. This will work. So Just generate a mesh in whatever way you do. Have an appropriate settings in a different file, and you can use it (e.g. the incomprehensible NS):
IncNavierStokesSolver mesh.xml sett.xmlIf I understand what your intend is to have a number (more than one) of session xml files, each defining some different aspect of the solution and all using values from the <PARAMETERS> tag defined in the first one. So if I understand, you would like to eventually do:
IncNavierStokesSolver mesh.xml sett1.xml sett2.xml seet2.xml ...Which I think is not possible at the moment (is it?).
If this is something you really need, you can think of a small Python script that would read in separate xml files with settings, parse them and then spit out a ready settings file for your simulation.
Cheers,
Stan
On 12.07.2022 19:36, İlteber Özdemir wrote:
This email from rilteber@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 to disable email stamping for this address.
Hello everybody,
I am quite new to Nektar++ and trying to get used to it. I want to define some parameters in a separate file and want to use them both in my mesh.mcf and session.mcf files. By doing so I can define the problem parameters in one file and let all the other files read from it. How can I do this?
Cheers,Ilteber
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
Nektar-users mailing list
Nektar-users@imperial.ac.uk
https://mailman.ic.ac.uk/mailman/listinfo/nektar-users
_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users