ExtremeFLOW / neko

/ᐠ. 。.ᐟ\ᵐᵉᵒʷˎˊ˗
https://neko.cfd/
Other
158 stars 27 forks source link

Enable initial condition from field file #1283

Open vbaconnet opened 1 month ago

vbaconnet commented 1 month ago

With #1279 in preparation I thought it would be nice to be able to use a field file as an initial condition. A suggested plan for this would be (for the general case of a 3D simulation):

  1. Initialize from a 3D field file that has the exact same mesh
  2. Initialize from a 2D field file that has the same 2D slice mesh, that is then extruded on the 3D mesh
  3. Initialize from a 3D and/or 2D field file from a different mesh (interpolation)

As far as I understand point 1. should be a simple copy if the field file was output from neko? From what I understand, the rest would be more or less the same as in chkp_t for the interpolation, and the 2D extrusion could somehow make use of the map_1d?

timofeymukha commented 1 month ago

Hi! So, 1 is essentially "restart from a .fld instead of the checkpoint". I think this is generally useful.

Point 3 we already have, or at least would if the probes worked will, right? But not easily through the case file. Perhaps I am a bit confused...

Point 2 I think is the most tricky one by far. Considering we don't solve for 2D in Neko, what would be the scenario for using it?

njansson commented 1 month ago

Great, the reading part for point 1 already in place, what is missing is the infrastructure duct tape to glue it together from the case file.

point 2 is for sure the tricky part ;)

njansson commented 1 month ago

I guess one idea would be to have an "initial condition": "filename" field in the case file, and the filename can then be a nek5000 field, or even better HDF5

vbaconnet commented 1 month ago

Point 3 we already have, or at least would if the probes worked will, right? But not easily through the case file. Perhaps I am a bit confused...

Yes exactly, as Niclas said we have all the tools for it, it just needs some putting together.

Point 2 I think is the most tricky one by far. Considering we don't solve for 2D in Neko, what would be the scenario for using it?

Well it would be just running the "pseudo 2D" case in Neko with only 1 element in the spanwise direction, and reusing that result on the same case but extruded in the spanwise direction. So then not really 2D but it has that idea of extruding?

vbaconnet commented 1 month ago

I guess depending on the case one may run the same spanwise length but with a different number of elements... So then it would just be interpolation.

timofeymukha commented 1 month ago

Yeah, if you are going to do pseudo-2d then you might as well match the width I thought

ronithstanly commented 1 month ago

Adding the capability to give Nek5000 fields as IC to Neko would be very helpful to move several of my cases to Neko:)

njansson commented 1 month ago

Adding the capability to give Nek5000 fields as IC to Neko would be very helpful to move several of my cases to Neko:)

We should strive to have this as for any field that Neko could read. H5, Nek5000, CSV!?