fluidsim issueshttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues2024-01-10T15:41:27Zhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/155Update and reorganize the documentation on installing after Meson2024-01-10T15:41:27ZPierre AugierUpdate and reorganize the documentation on installing after MesonThere should be 3 distinct subjects on 3 distinct pages:
1. Simple installation without build (simple, in https://fluidsim.readthedocs.io/en/latest/install.html)
2. Installing from source (build options, Transonic backends, control Meso...There should be 3 distinct subjects on 3 distinct pages:
1. Simple installation without build (simple, in https://fluidsim.readthedocs.io/en/latest/install.html)
2. Installing from source (build options, Transonic backends, control Meson, in particular about parallelism and current environment variables like `CC`, ...)
3. For Fluidsim developers: installing in development mode (warning: Meson so no isolated build)
Currently it's there https://fluidsim.readthedocs.io/en/latest/install.html
CC @ogiorgishttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/154Upload wheels on PyPI with Github Actions!2024-01-30T09:16:46ZPierre AugierUpload wheels on PyPI with Github Actions!After we switched to Meson (with !346), it should be doable to produce and upload proper wheels on PyPI using Github Actions.
It would be very convenient for users since a simple `pip install fluidsim` would no longer trigger a build!
...After we switched to Meson (with !346), it should be doable to produce and upload proper wheels on PyPI using Github Actions.
It would be very convenient for users since a simple `pip install fluidsim` would no longer trigger a build!
@ogiorgis I would be interested to discuss with you about this possibility :-)https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/115Poloidal toroiral decomposition from physical states2022-04-14T09:58:34ZPierre AugierPoloidal toroiral decomposition from physical statesIt would be nice to have a command line to create a file containing the poloidal/toroidal decomposition in physical space (div vh, omega_z, vx_t, vy_t, vx_p, vy_p) from a file containing a physical state.It would be nice to have a command line to create a file containing the poloidal/toroidal decomposition in physical space (div vh, omega_z, vx_t, vy_t, vx_p, vy_p) from a file containing a physical state.https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/113Accessing simulation data2022-04-06T10:16:16ZPaul TremperAccessing simulation dataI am trying to access the output data of the example simulation at https://fluidsim.readthedocs.io/en/latest/examples/running-simul-onlineplot.html as a numpy array for further analysis but I cannot figure out how. Could you show me how ...I am trying to access the output data of the example simulation at https://fluidsim.readthedocs.io/en/latest/examples/running-simul-onlineplot.html as a numpy array for further analysis but I cannot figure out how. Could you show me how to e.g. get the data necessary to produce the quiver plot on the same page manually?https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/111Kolmogorov flow forcing for ns2d and ns3d2022-03-15T11:02:14ZPierre AugierKolmogorov flow forcing for ns2d and ns3dIt would be useful to have a forcing for Kolmogorov flow (see [this interesting review](https://doi.org/10.4236/jamp.2018.611187)).
It would be good to have it for both ns2d and ns3d based solvers.
In 3d, it would be good to be support...It would be useful to have a forcing for Kolmogorov flow (see [this interesting review](https://doi.org/10.4236/jamp.2018.611187)).
It would be good to have it for both ns2d and ns3d based solvers.
In 3d, it would be good to be support 2 directions for the shear (y and z, let's say that the velocity is along x).
Also for turbulence studies, it could be nice to support constant forcing (standard K-flow) and "normalized K-flow" such that this energy injection would be constant.
Note that for ns3d.strat, this would be a very simple way to study sheared stratified turbulence. Very "low hanging fruit" study with Fluidsim!https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/1102D turbulence on a sphere, by extending sw1l and sw1l.modified with FluidSHT ...2022-03-12T18:23:57ZAshwin V. Mohanan2D turbulence on a sphere, by extending sw1l and sw1l.modified with FluidSHT operatorsAs a follow up of the Augier et al. (2019) and Lindborg & Mohanan (2017), a simulation using FluidSHT can be done. For the required theory and as a starting point one could look at:
1. E. Lindborg and A. Nordmark, “Two-dimensional turbu...As a follow up of the Augier et al. (2019) and Lindborg & Mohanan (2017), a simulation using FluidSHT can be done. For the required theory and as a starting point one could look at:
1. E. Lindborg and A. Nordmark, “Two-dimensional turbulence on a sphere,” J. Fluid Mech., vol. 933, p. A60, Feb. 2022, doi: [10.1017/jfm.2021.1130](https://doi.org/10.1017/jfm.2021.1130).
2. A. P. Showman, “Numerical Simulations of Forced Shallow-Water Turbulence: Effects of Moist Convection on the Large-Scale Circulation of Jupiter and Saturn,” Journal of the Atmospheric Sciences, vol. 64, no. 9, pp. 3132–3157, Sep. 2007, doi: [10.1175/JAS4007.1](https://doi.org/10.1175/JAS4007.1).
3. R. K. Scott and L. M. Polvani, “Forced-Dissipative Shallow-Water Turbulence on the Sphere and the Atmospheric Circulation of the Giant Planets,” Journal of the Atmospheric Sciences, vol. 64, no. 9, pp. 3158–3176, Sep. 2007, doi: [10.1175/JAS4003.1](https://doi.org/10.1175/JAS4003.1).https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/109from fluidsim import load; sim=load() should be able to load snek5000 simulat...2022-03-11T14:36:08ZPierre Augierfrom fluidsim import load; sim=load() should be able to load snek5000 simulationsPierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/108Different diffusivity coefficients for different variables (Prandtl/Schmidt n...2022-03-11T11:35:46ZPierre AugierDifferent diffusivity coefficients for different variables (Prandtl/Schmidt numbers)See `_init_freq_lin`, `sim.compute_freq_diss`, `sim.compute_freq_complex`
In fluidsim/base/time_stepping/pseudo_spect.py, there is something like:
```python
def _init_freq_lin(self):
f_d, f_d_hypo = self.sim.compute_freq_di...See `_init_freq_lin`, `sim.compute_freq_diss`, `sim.compute_freq_complex`
In fluidsim/base/time_stepping/pseudo_spect.py, there is something like:
```python
def _init_freq_lin(self):
f_d, f_d_hypo = self.sim.compute_freq_diss()
freq_dissip = f_d + f_d_hypo
self.freq_lin = freq_dissip
```
Now, `f_d` is real and has a shape of `sim.oper.K2` (see `compute_freq_diss` in fluidsim/base/solvers/pseudo_spect.py).
However, it's already supported to have `self.freq_lin` with a different shape (`sim.state.state_spect.shape`) as done in
```python
def _compute_freq_complex(self):
state_spect = self.sim.state.state_spect
freq_complex = np.empty_like(state_spect)
for ik, key in enumerate(state_spect.keys):
freq_complex[ik] = self.sim.compute_freq_complex(key)
return freq_complex
```
We need to change `compute_freq_diss` for some solvers supporting the `Prandtl` parameter.
Beware that `compute_freq_diss` is used in other places (in particular spatial_means and spect_energy_budg)...Pierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/105Kolmogorov laws for stratified turbulence2022-04-06T14:50:07ZPierre AugierKolmogorov laws for stratified turbulenceIt would be great to be able to compute and plot quantities (anisotropic third order structure functions) described in this article: P. Augier, S. Galtier, and P. Billant. Kolmogorov laws for stratified turbulence. J. Fluid Mech., 709:65...It would be great to be able to compute and plot quantities (anisotropic third order structure functions) described in this article: P. Augier, S. Galtier, and P. Billant. Kolmogorov laws for stratified turbulence. J. Fluid Mech., 709:659–670, 2012. doi:10.1017/jfm.2012.379.
https://www.cambridge.org/core/journals/journal-of-fluid-mechanics/article/abs/kolmogorov-laws-for-stratified-turbulence/932692E9DF9E9E3C2F2E7CF61BA28828 (http://yakari.polytechnique.fr/Django-pub/documents/augier2012rp-2pp.pdf)
It would be a great addition in particular for simulations done with `fluidsim.util.scripts.turb_trandom_anisotropic`.
CC @vlabarrehttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/104Simul class made of coupled Simul classes2022-03-01T09:49:09ZPierre AugierSimul class made of coupled Simul classesIt should be possible to define solvers composed of coupled subsystems. They could be used for different applications:
- particles advected in a flow (simplest, we could start by this case, for example ns2d + particles)
- fluid + passiv...It should be possible to define solvers composed of coupled subsystems. They could be used for different applications:
- particles advected in a flow (simplest, we could start by this case, for example ns2d + particles)
- fluid + passive scalar at higher resolution (warning: transfers between differently distributed arrays of different shapes)
- fluid-structure interaction (see for example https://www.sciencedirect.com/science/article/pii/S0021999114006792)
It should be possible to record in a base `Simul` class different interacting (coupled) Simul classes.
The creation of the result directory should be done at the level of the main class and it should be possible to tell the interacting classes that they should use subdirectories inside the main directory.
For example for a fluid-structure interaction solver, something like:
```python
assert sim.sim_fluid.output.path_run == sim.output.path_run + "/fluid"
assert sim.sim_solid.output.path_run == sim.output.path_run + "/solid"
```
The interaction should be coded in the main `TimeStepping` class. Of course the 2 timesteps could be very different. As the computational cost of advancement of the different subsystems.Pierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/102NormalizedForcing: params.forcing.key_forced = ["...", "..."]2022-03-08T21:12:27ZPierre AugierNormalizedForcing: params.forcing.key_forced = ["...", "..."]We'd like to support things like:
```
params.forcing.key_forced = ["vt_fft", "vp_fft"]
```
(i.e. more than one keys). This would allow in particular to force a solenoidal (incompressible) field.We'd like to support things like:
```
params.forcing.key_forced = ["vt_fft", "vp_fft"]
```
(i.e. more than one keys). This would allow in particular to force a solenoidal (incompressible) field.Pierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/101ns3d.mdh or mdh3d2022-03-01T17:49:41ZPierre Augierns3d.mdh or mdh3dIt should be very simple to implement the basis of a 3d mhd solver from our solver ns3d.
It would be nice to do that and then to find a collaboration to build a more complete solver with nice "init fields" / outputs / forcing. Note that...It should be very simple to implement the basis of a 3d mhd solver from our solver ns3d.
It would be nice to do that and then to find a collaboration to build a more complete solver with nice "init fields" / outputs / forcing. Note that all "init fields" and forcing "nd3d" methods should work.
- Should support a static (vector) B0
- Dissipation on v and B should be different (we don't support that for now in ns3d.strat)
- remark: I wonder which constant forcing could be used to get a (turbulent) dynamo.
For the equations, see https://en.wikipedia.org/wiki/Magnetohydrodynamic_turbulencePierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/100Increase coverage2022-02-21T11:24:55ZPierre AugierIncrease coverageWe need to work a bit on coverage https://app.codecov.io/gh/fluiddyn/fluidsim
### Remove from the fluidsim package
- [x] fluidsim/solvers/ns2d/strat/find_dissipation.py
- [x] fluidsim/base/dedalus
- [x] fluidsim/base/basilisk
### Run ...We need to work a bit on coverage https://app.codecov.io/gh/fluiddyn/fluidsim
### Remove from the fluidsim package
- [x] fluidsim/solvers/ns2d/strat/find_dissipation.py
- [x] fluidsim/base/dedalus
- [x] fluidsim/base/basilisk
### Run tests on Heptapod CI
- [ ] fluidsim/solvers/sphere
### More/better testing
- [ ] fluidsim_core/output.py
- [ ] fluidsim_core/params.py
- [ ] fluidsim/base/preprocess/pseudo_spect.py
- [ ] fluidsim/util/console/bench_analysis.py
- [ ] fluidsim/operators/operators3d.py
- [ ] fluidsim/operators/op_finitediff2d.py
- [ ] fluidsim/base/output/phys_fields3d.py
- [ ] fluidsim/operators/operators2d.py
- [ ] fluidsim/solvers/sphere/sw1l/state.pyPierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/99Global shear as in Snoopy2022-02-11T13:44:36ZPierre AugierGlobal shear as in SnoopyThe [Snoopy](https://ipag.osug.fr/~lesurg/snoopy.html) code has an option `WITH_SHEAR` for global shear (see also `TIME_DEPENDANT_SHEAR`).
There are 3 variables `kxt`, `k2t` and `ik2t` depending on time used to compute the operators.
`...The [Snoopy](https://ipag.osug.fr/~lesurg/snoopy.html) code has an option `WITH_SHEAR` for global shear (see also `TIME_DEPENDANT_SHEAR`).
There are 3 variables `kxt`, `k2t` and `ik2t` depending on time used to compute the operators.
```C
void kvolve(const double tremap) {
int i, j, k;
for( i = 0; i < NX_COMPLEX/NPROC; i++) {
for( j = 0; j < NY_COMPLEX; j++) {
for( k = 0; k < NZ_COMPLEX; k++) {
kxt[ IDX3D ] = kx[ IDX3D ] + tremap * param.shear * ky[ IDX3D ];
```
`tremap` is a time related to the shear.
From time to time, the fields has to be "remaped" with something like:
```C
void remap(double complex qi[]) {
int i, j, k;
int nx, ny, nxtarget;
for( i = 0; i < NX_COMPLEX; i++) {
nx = fmod( i + (NX_COMPLEX / 2) , NX_COMPLEX ) - NX_COMPLEX / 2 ;
for( j = 0; j < NY_COMPLEX; j++) {
ny = fmod( j + (NY_COMPLEX / 2) , NY_COMPLEX ) - NY_COMPLEX / 2 ;
nxtarget = nx + ny; // We have a negative shear, hence nx plus ny
if( (nxtarget > -NX_COMPLEX / 2) & (nxtarget < NX_COMPLEX/2)) {
if ( nxtarget <0 ) nxtarget = nxtarget + NX_COMPLEX;
for( k = 0; k < NZ_COMPLEX; k++) {
w1[k + NZ_COMPLEX * j + NZ_COMPLEX * NY_COMPLEX * nxtarget] = qi[ IDX3D ];
}
}
}
}
```https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/96New class fluidsim_core.movies.MoviesBase2022-02-02T03:42:48ZPierre AugierNew class fluidsim_core.movies.MoviesBaseWe should split `fluidsim.base.output.movies.MoviesBase` and use a new class `fluidsim_core.movies.MoviesBase` which can be used in other solvers using fluidsim_core (first, [snek5000](https://github.com/exabl/snek5000)).We should split `fluidsim.base.output.movies.MoviesBase` and use a new class `fluidsim_core.movies.MoviesBase` which can be used in other solvers using fluidsim_core (first, [snek5000](https://github.com/exabl/snek5000)).Version 0.7.0Pierre AugierPierre Augierhttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/92Random forcing (TimeCorrelatedRandomPseudoSpectral) with Ornstein–Uhlenbeck p...2022-01-12T13:00:01ZPierre AugierRandom forcing (TimeCorrelatedRandomPseudoSpectral) with Ornstein–Uhlenbeck processSee https://en.wikipedia.org/wiki/Ornstein%E2%80%93Uhlenbeck_process
I guess it should be implemented in the class TimeCorrelatedRandomPseudoSpectral
https://foss.heptapod.net/fluiddyn/fluidsim/-/blob/branch/default/fluidsim/base/forci...See https://en.wikipedia.org/wiki/Ornstein%E2%80%93Uhlenbeck_process
I guess it should be implemented in the class TimeCorrelatedRandomPseudoSpectral
https://foss.heptapod.net/fluiddyn/fluidsim/-/blob/branch/default/fluidsim/base/forcing/specific.py#L800
CC. @vlabarrehttps://foss.heptapod.net/fluiddyn/fluidsim/-/issues/88Idea of exercice with ns3d: spectra in non-stationnary decaying turbulence2021-10-19T12:33:39ZPierre AugierIdea of exercice with ns3d: spectra in non-stationnary decaying turbulenceIt would be interesting to investigate numerically ideas described here: https://meetings.aps.org/Meeting/DFD21/Session/P04.4
For the decaying turbulence, one can use phase shifting time stepping.
We can also look at what it gives with...It would be interesting to investigate numerically ideas described here: https://meetings.aps.org/Meeting/DFD21/Session/P04.4
For the decaying turbulence, one can use phase shifting time stepping.
We can also look at what it gives with a wake of a sphere (forcing in physical space with a kind of "laminarisation region").https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/87Compute "anisotropy" of Reynolds tensor2022-03-27T20:15:44ZPierre AugierCompute "anisotropy" of Reynolds tensorSee for example https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.126.194501See for example https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.126.194501https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/82Dispersion relation for the Spatio-temporal spectra when δkx != δky2021-05-28T13:17:02ZAntoine BardantDispersion relation for the Spatio-temporal spectra when δkx != δkyFrom the temporal spectra, I took the w/N value of the first mode ikz and ikh = 1 (w/N = 0.1).\
And I plotted the spatio-temporal spectra at this value.
![Figure_1](/uploads/79eb7a04b27c940455c8da6a92d68a57/Figure_1.png)
The first cros...From the temporal spectra, I took the w/N value of the first mode ikz and ikh = 1 (w/N = 0.1).\
And I plotted the spatio-temporal spectra at this value.
![Figure_1](/uploads/79eb7a04b27c940455c8da6a92d68a57/Figure_1.png)
The first cross does not seem to be in its place :
![Figure_4](/uploads/fb311564d42eb129fea8064f40baa618/Figure_4.png)https://foss.heptapod.net/fluiddyn/fluidsim/-/issues/76general plots improvements2021-05-25T09:25:10ZJason Reneuvegeneral plots improvementsMinor improvements could be done to some plotting functions :
- [x] in `spectra.plot1d` : change the color of the "poloidal" lines to something more visible
- [ ] in `phys_fields.plot` : when superimposing the velocity field as a quive...Minor improvements could be done to some plotting functions :
- [x] in `spectra.plot1d` : change the color of the "poloidal" lines to something more visible
- [ ] in `phys_fields.plot` : when superimposing the velocity field as a quiver plot, print in the figure title the standard deviation of the velocity in the slice (just like its done with the average value)