Mar-24-2024, 11:09 PM
(This post was last modified: Mar-24-2024, 11:12 PM by joellapointe_engineering.)
I have a problem forming a symbolic equation with the sympy command "sp.Eq()".I have an Excel sheet with equations formed by concatenation of cells as follow :
Then, an Excel concatenation is done to form the equation :
'+F_WORM_X*1+R_WORM_LOW_BEA_X*1+R_WORM_UP_BEA_X*1+F_WORM_FRIC_X*1'
So this Excel equation is put in a panda dataframe from the Excel sheet :
And the symbolic equation is formed from the content of the dataframe :
It gives me a sympify error :
Is it a bas equation formation?
It is not clear for me what is the problem with the equation?
Then, an Excel concatenation is done to form the equation :
'+F_WORM_X*1+R_WORM_LOW_BEA_X*1+R_WORM_UP_BEA_X*1+F_WORM_FRIC_X*1'
So this Excel equation is put in a panda dataframe from the Excel sheet :
Quote:FBD_WORM_ = pd.read_excel("FUSION EPS_LOAD CASE_BIGBLUE_V03.xlsx", sheet_name = "FBD worm", )
And the symbolic equation is formed from the content of the dataframe :
Quote:EQ_W_1 = sp.Eq(FBD_WORM_.iloc[14, 3], 0)
It gives me a sympify error :
Quote:runfile('G:/Mon disque/2023-08-07/Nouveau classement/PROJETS/FUSION/LOAD CASES VS BIGBLUE/Fusion_Bearing Analysis_BiBlue Case_V03.py', wdir='G:/Mon disque/2023-08-07/Nouveau classement/PROJETS/FUSION/LOAD CASES VS BIGBLUE')Traceback (most recent call last):
File C:\ProgramData\anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec exec(code, globals, locals)
File g:\mon disque\2023-08-07\nouveau classement\projets\fusion\load cases vs bigblue\fusion_bearing analysis_biblue case_v03.py:65 EQ_W_1 = sp.Eq(FBD_WORM_.iloc[14, 3], 0)
File C:\ProgramData\anaconda3\lib\site-packages\sympy\core\relational.py:626 in new lhs = _sympify(lhs)
File C:\ProgramData\anaconda3\lib\site-packages\sympy\core\sympify.py:529 in _sympify return sympify(a, strict=True)
File C:\ProgramData\anaconda3\lib\site-packages\sympy\core\sympify.py:450 in sympify raise SympifyError(a)
SympifyError: SympifyError: '+F_WORM_X1+R_WORM_LOW_BEA_X1+R_WORM_UP_BEA_X1+F_WORM_FRIC_X1'
Is it a bas equation formation?
It is not clear for me what is the problem with the equation?