Hi Cory,
Its exactly what I wanted to do, thanks.
I am trying to define a density profile like indicated on the documentation:
"rho": [
[0.0, 1.225],
[2000.0, 1.0066],
[4000.0, 0.81935],
["m", "kg/m^3"]
]
Whenever I start try to solve the forces with this profile or another, I get this error:
/mnt/sda2/Work/CDYYY-Dev/python-utils/pyWings/planform.py:55: RuntimeWarning: invalid value encountered in true_divide
return vector / np.linalg.norm(vector)
/home/charles/miniconda3/envs/default/lib/python3.8/site-packages/numpy/linalg/linalg.py:2159: RuntimeWarning: invalid value encountered in det
r = _umath_linalg.det(a, signature=signature)
Traceback (most recent call last):
File "hydrofoil.py", line 36, in <module>
my_scene.target_CL(CL=-0.15, set_state=True)
File "/mnt/sda2/Work/CDYYY-Dev/python-utils/MachupX/machupX/scene.py", line 3176, in target_CL
CL = self.solve_forces(dimensional=False)[aircraft_name]["total"]["CL"]
File "/mnt/sda2/Work/CDYYY-Dev/python-utils/MachupX/machupX/scene.py", line 1451, in solve_forces
self._handle_error(e)
File "/mnt/sda2/Work/CDYYY-Dev/python-utils/MachupX/machupX/scene.py", line 3104, in _handle_error
raise error
File "/mnt/sda2/Work/CDYYY-Dev/python-utils/MachupX/machupX/scene.py", line 1448, in solve_forces
integrate_time = self._integrate_forces_and_moments(**kwargs)
File "/mnt/sda2/Work/CDYYY-Dev/python-utils/MachupX/machupX/scene.py", line 933, in _integrate_forces_and_moments
dF_inv = (self._rho*self._gamma)[:,np.newaxis]*np.cross(self._v_i, self._dl)
ValueError: operands could not be broadcast together with shapes (3,) (200,)
It works with a constant "rho" value
Thanks