Zephyr Scientific Library (zscilib)
fluids.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020 Kevin Townsend (KTOWN)
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
22 #ifndef ZEPHYR_INCLUDE_ZSL_FLUIDS_H_
23 #define ZEPHYR_INCLUDE_ZSL_FLUIDS_H_
24 
25 #include <zsl/zsl.h>
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
42 
55 
70  zsl_real_t *p);
71 
84 
99  zsl_real_t *v2);
100 
116  zsl_real_t *f2);
117 
134  zsl_real_t v2, zsl_real_t *p2);
135 
149 
150 #ifdef __cplusplus
151 }
152 #endif
153 
154 #endif /* ZEPHYR_INCLUDE_ZSL_FLUIDS_H_ */
155  /* End of fluids group */
zsl_phy_fluid_force_prop
int zsl_phy_fluid_force_prop(zsl_real_t a1, zsl_real_t f1, zsl_real_t a2, zsl_real_t *f2)
Given two sections of a pipe with different surfaces 'a1' and 'a2' and knowing the value of the force...
zsl_phy_fluid_press
int zsl_phy_fluid_press(zsl_real_t p0, zsl_real_t h, zsl_real_t d, zsl_real_t *p)
Calculates pressure in pascals of a body submerged 'h' meters down the surface of a fluid,...
zsl_phy_fluid_flow_rate
int zsl_phy_fluid_flow_rate(zsl_real_t a1, zsl_real_t v1, zsl_real_t a2, zsl_real_t *v2)
Given two sections of a pipe with different surfaces 'a1' and 'a2' and knowing the value of the veloc...
zsl_phy_fluid_bouyant_force
int zsl_phy_fluid_bouyant_force(zsl_real_t v, zsl_real_t d, zsl_real_t *f)
Calculates the module of the upwards force experienced by a body submerged into a fluid,...
zsl_phy_fluid_volume_flow_rate
int zsl_phy_fluid_volume_flow_rate(zsl_real_t vel, zsl_real_t a, zsl_real_t *v)
Calculates the volume flow rate of a flowing fluid based on its velocity (vel) in a section of surfac...
zsl.h
API header file for zscilib.
zsl_phy_fluid_simple_press
int zsl_phy_fluid_simple_press(zsl_real_t f, zsl_real_t a, zsl_real_t *p)
Calculates the pressure in pascals based on a force (f) against a surface (a).
zsl_phy_fluid_dens
int zsl_phy_fluid_dens(zsl_real_t m, zsl_real_t v, zsl_real_t *d)
Calculates the density of a material based on its mass and volume.
zsl_real_t
double zsl_real_t
Definition: zsl.h:51
zsl_phy_fluid_bernoulli
int zsl_phy_fluid_bernoulli(zsl_real_t d, zsl_real_t v1, zsl_real_t p1, zsl_real_t v2, zsl_real_t *p2)
Given a pipe in which a fluid flows at different velocities 'v1' and 'v2' in two different sections a...