Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.2%) to scientific vocabulary
Repository
Python script to compute Structure Function
Basic Info
- Host: GitHub
- Owner: soumyadesude
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 35.2 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
SF-py
Python scripts to compute Structure Function. These codes computes the structure function using the vectorization approach, as shown in https://joss.theoj.org/papers/10.21105/joss.02185. This code is compatible with both CPU and GPU.
All the relevant files are contained in the following directories:
2d/SF_2nd_order.py- contains the scripts to compute second order structure functions for two-dimensional input data2d/SF_3rd_order.py- contains the scripts to compute third order structure functions for two-dimensional input data3d/SF_2nd_order.py- contains the scripts to compute second order structure functions for three-dimensional input data3d/SF_3rd_order.py- contains the scripts to compute third order structure functions for three-dimensional input data
Installing SF-py
SF relies on a few prerequisites which are Python, h5py, Numba, Cupy [For gpu].
Running SF-py
Please set the following things before you run the code.
#input field
#change the names of the input file and datasets according to your convenience
Vx = hdf5reader("U.V1r.h5", "U.V1r")
Vz = hdf5reader("U.V3r.h5", "U.V3r")
Change the input file name and the names of the datasets. The above is the example of 2D input data. The similar thing is applicable for 3d also.
-
##input ##
L = 2*np.pi #Length of the domain
Change the domain length according to your need.
-
##device ##
device = "cpu" #by default code will run on cpu
Change the device to "gpu" if you need.
-
##device id ##
device_id = 0 #by default code will run on gpu0
Change the device_id accordingly to use a particular gpu on which you want to run the code.
SF-py can be executed by the following way at the respective folders (2d/3d).
Example: for 2nd order structure function:
python SF_2nd_order.py
Output of the SF-py
SF-py outputs "str_function.h5" file, which contains the following datasets:
For 2nd order-S: This dataset corresponds to $\langle(|\delta u|)^2\rangle$.
S_u_r: This dataset corresponds to $\langle(|\delta u{\parallel}|)^2\rangle$.
``Sux``: This dataset corresponds to $\langle(|\delta u{x}|)^2\rangle$.
S_u_z: This dataset corresponds to $\langle(|\delta u{z}|)^2\rangle$.
``Suy``: This dataset corresponds to $\langle(|\delta u{y}|)^2\rangle$. This is available in the output only for 3d data.For 3rd order-S: This dataset corresponds to $\langle(|\delta u|)^2\delta u{\parallel}\rangle$.
``Sur``: This dataset corresponds to $\langle(|\delta u{\parallel}|)^3\rangle$.
S_u_x: This dataset corresponds to $\langle(|\delta u|)^2\delta u{x}\rangle$.
``Suz``: This dataset corresponds to $\langle(|\delta u|)^2\delta u{z}\rangle$.
S_u_y: This dataset corresponds to $\langle(|\delta u|)^2\delta u_{y}\rangle$. This is available in the output only for 3d data.
License
SF-py is an open-source package made available under the New BSD License.
Contributions and bug reports
Contributions to this project are very welcome. If you wish to contribute, please create a branch with a pull request and the proposed changes can be discussed there.
If you find a bug, please open a new issue on the GitHub repository to report the bug. Please provide sufficient information for the bug to be reproduced.
#
Owner
- Name: Soumyadeep Chatterjee
- Login: soumyadesude
- Kind: user
- Location: Kanpur
- Company: IIT Kanpur
- Website: inspire.soumya@gmail.com
- Repositories: 3
- Profile: https://github.com/soumyadesude
Doctoral student at IIT-Kanpur.
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Chatterjee
given-names: Soumyadeep
orcid:
title: "SF-py"
version: 1.0.0
doi: 10.5281/zenodo.10060564
date-released: 2023-11-1
url: https://github.com/soumyadesude/SF-py
GitHub Events
Total
- Push event: 2
Last Year
- Push event: 2