-
released this
2026-11-24 07:07:20 +00:00 | 0 commits to main since this releaseThe DOI of this source code: https://doi.org/10.58473/ChengZhuSci0003/03
Introduction: This model adopts the the conception of Reynolds number to simulate the boundary layer formation process, and the multi-dimension arrays are used to calculate the variables in the spatial grids along x, y, z axes;
Development Language: C++;
All Rights Reserved.
Reference: Liu Huan (2024). Exploring the formation of ocean current and the underlying hydrology. Journal of Astronomy and Earth Sciences (ISSN2958-4043). 2024 (12). https://doi.org/10.58473/JAES0011
Copyrights Certificate Registered by Brock Chain Technology: Brock Chain ID (4e0a2b83688ef1b73a7bada93f0032a4b8eeacd9053a55a08b7fb2f84d215b5e). Registered Time: 2025-11-12 15:33.
Source Code:
//@All Rights Reserved by Liu Huan. Source from: https://doi.org/10.58473/JAES0011#include<iostream>
#include <vector>
#include<math.h>
#include <map>
#include <iomanip>
#include <tuple>using namespace std;
int main ()
{
int I,J,K;
cout << "Input the longitude grid scale (I): ";
cin >> I;
cout << "Input the latitude grid scale (J): ";
cin >> J;
cout << "Input the altitude grid scale (K): ";
cin >> K;float n=2.0,e=2.718; vector<vector<vector<float>>> X(I, vector<vector<float>>(J, vector<float>(K))); vector<vector<vector<float>>> Y(I, vector<vector<float>>(J, vector<float>(K))); vector<vector<vector<float>>> Z(I, vector<vector<float>>(J, vector<float>(K))); vector<vector<vector<float>>> R(I, vector<vector<float>>(J, vector<float>(K))); cout << "\n=== Input the relative speed in each grid ===" << endl; for (int i = 0; i < I; i++) { for (int j = 0; j < J; j++) { for (int k = 0; k < K; k++) { cout << "The relative speed X[" << i << "][" << j << "][" << k << "]: "; cin >> X[i][j][k]; } } } cout << "\n=== Input the salinity variation in each grid ===" << endl; for (int i = 0; i < I; i++) { for (int j = 0; j < J; j++) { for (int k = 0; k < K; k++) { cout << "The salinity variation Y[" << i << "][" << j << "][" << k << "]: "; cin >> Y[i][j][k]; } } } cout << "\n=== Input the temperature variation in each grid ===" << endl; for (int i = 0; i < I; i++) { for (int j = 0; j < J; j++) { for (int k = 0; k < K; k++) { cout << "The temperature variation Z[" << i << "][" << j << "][" << k << "]: "; cin >> Z[i][j][k]; } } } for(int i=0;i<I;i++) { for(int j=0;j<J;j++) { for(int k=0;k<K;k++) { R[i][j][k]=2*(pow(X[i][j][k],n))*(pow(e,X[i][j][k]))/(3*((Y[i][j][k])*(Z[i][j][k]))); } } } cout << "\n=== The results of Reynolds number ===" << endl; for(int i=0;i<I;i++) { for(int j=0;j<J;j++) { for(int k=0;k<K;k++) { cout << "Element at R["<< i<< "]["<<j<<"]["<<k<<"]=" << R[i][j][k] << endl; } } } return 0;}
Downloads