[sympy] Re: 4th order tensor

2013-10-03 Thread Yuxiang Wang
Hi, I was just wondering that - after two one year, is this problem solved now? -Shawn On Thursday, August 16, 2012 8:53:11 AM UTC-4, rochabm wrote: > > Hi everyone, > > I'm working on a simple code to calculate some tensors I need to use in > continuum mechanics. > In one part of my code I ne

[sympy] Re: 4th order tensor

2013-10-04 Thread Yuxiang Wang
to write over 50+ pages of derivation in continuum mechanics and I think this will be really a must-have to free mechanical engineers :) Looking forward to the new features! -Shawn On Friday, October 4, 2013 1:47:49 AM UTC-4, F. B. wrote: > > > > On Thursday, October 3, 2013 11:20:05

[sympy] Cannot do mpmath.sqrtm() in sympy

2014-11-24 Thread Yuxiang Wang
Dear all, I have the following code to extract the square root of a symmetric second-order tensor. from sympy import symbols, Matrix, mpmathimport numpy as np F11, F12, F13, F21, F22, F23, F31, F32, F33 = symbols('F11, F12, F13, F21, F22, F23, F31, F32, F33', real=True) F = np.array([[F11, F

Re: [sympy] Cannot do mpmath.sqrtm() in sympy

2014-11-24 Thread Yuxiang Wang
utine for > symbolic matrices implemented. > > Cheers, > > Tim. > > On 24 Nov 2014, at 14:05, Yuxiang Wang wrote: > > > Dear all, > > > > I have the following code to extract the square root of a symmetric > > second-order tensor. > >

Re: [sympy] Cannot do mpmath.sqrtm() in sympy

2014-11-24 Thread Yuxiang Wang
sing NumPy at that point, vs. sympy.Matrix. > > Aaron Meurer > > On Mon, Nov 24, 2014 at 12:23 PM, Yuxiang Wang > > wrote: > > Hi Tim, > > > > Thank you for your response! > > > > And thanks for letting me know that symbolic square root matrix r

[sympy] Solving a simple systems of equations with SymPy?

2014-11-24 Thread Yuxiang Wang
Hi all, I have this equation, which is Vieta's formula and is polynomial. SymPy code: didn't work... just hang there from sympy.abc import x, y, z, a, b, c from sympy import solve solve([x+y+z-a, x*y+y*z+x*z-b, x*y*z-c], [x, y, z]) Mathematica worked. Solve[{x + y + z == a, x y + y z + x z

Re: [sympy] Solving a simple systems of equations with SymPy?

2014-11-24 Thread Yuxiang Wang
#solving-equations > > Cheers, > > Tim. > > On 24 Nov 2014, at 20:26, Yuxiang Wang wrote: > > > Hi all, > > > > I have this equation, which is Vieta's formula and is polynomial. > > > > SymPy code: didn't work... just hang ther

Re: [sympy] Solving a simple systems of equations with SymPy?

2014-11-24 Thread Yuxiang Wang
ing the Mathematica result > so a test case can be made. > > Thanks, > > Tim. > > On 24 Nov 2014, at 21:19, Yuxiang Wang wrote: > > > Hi Tim, > > > > Thank you! I did try that, but it still hang there... > > > > from sympy.ab

Re: [sympy] Cannot do mpmath.sqrtm() in sympy

2014-11-25 Thread Yuxiang Wang
ay, November 24, 2014 5:30:48 PM UTC-6, Yuxiang Wang wrote: >> >> Hi Aaron, >> >> Thank you for the response! >> >> I tried to use numpy.ndarray because I got other orders of tensors, so I >> wanted to be consistent. But it seems that Matrix object can be

Re: [sympy] Sympy assumptions

2014-12-06 Thread Yuxiang Wang
Hi Richard, I do get your point that we don't have to make the same mistake with other systems, but I do think there is a benefit for consistency, if they have a purpose in doing that design. For most systems, sqrt() returns the principal/positive square root, so there is only one unique value.

Re: [sympy] Sympy assumptions

2014-12-06 Thread Yuxiang Wang
s. -Shawn On Saturday, December 6, 2014 7:01:32 PM UTC-5, Joachim Durchholz wrote: > > Am 06.12.2014 um 17:03 schrieb Yuxiang Wang: > > Hi Richard, > > > > I do get your point that we don't have to make the same mistake with > other > > systems, but I do t

[sympy] Re: Error in symbolic integration

2014-12-10 Thread Yuxiang Wang
I am using 0.7.6 on Python 3.4 but it just hang there. Strange. On Wednesday, December 10, 2014 10:30:29 AM UTC-5, Sergey Kirpichev wrote: > > On Wednesday, December 10, 2014 3:28:44 PM UTC+3, ali...@gmail.com wrote: >> >> When integrating with sympy something goes wrong - maybe a bug: >> x = Symb

[sympy] Positive-definiteness of a Matrix instance in sympy

2015-02-02 Thread Yuxiang Wang
Dear all, I am currently trying to do solid mechanics (finite deformation) in SymPy. There are a lot of matrices that are positive definite, but I do not know whether there is a way to define this property in SymPy. Any help would be deeply appreciated! Take this code snippet for example: ``

Re: [sympy] Positive-definiteness of a Matrix instance in sympy

2015-02-02 Thread Yuxiang Wang
thematically correct? Thanks! Shawn On Monday, February 2, 2015 at 2:49:19 PM UTC-5, Aaron Meurer wrote: > > > > On Mon, Feb 2, 2015 at 1:14 PM, Yuxiang Wang > wrote: > >> Dear all, >> >> I am currently trying to do solid mechanics (finite deformation) in

Re: [sympy] Positive-definiteness of a Matrix instance in sympy

2015-02-04 Thread Yuxiang Wang
Chris, Thank you for looking into this! I really appreciate it. And you are right that det(M) == Mul(*M.eigenvals()) However, if M is positive definite, then sqrt(det(M)) should also equal to sqrt(lambda1)*sqrt(lambda2)*sqrt(lambda3), where lambda1 - 3 are the eigenvalues of the matrix. (Becau

Re: [sympy] Positive-definiteness of a Matrix instance in sympy

2015-02-04 Thread Yuxiang Wang
ron Meurer > > On Mon, Feb 2, 2015 at 9:52 PM, Yuxiang Wang > wrote: > >> Hi Aaron, >> >> Thank you for your response! >> >> 1) You are right that it is a bug. If I do this: >> >> from sympy import symbols, sqrt, simplify, Matrix, Q >> fro

Re: [sympy] Positive-definiteness of a Matrix instance in sympy

2015-02-13 Thread Yuxiang Wang
Aaron, Thanks for your response! And sorry for the late reply. You mentioned: sqrt(det(M)) != sqrt(eigen1) * sqrt(eigen2) * sqrt(eigen3) is True if M is positive definite, so that det(M) is positive, eigen1-3 are positive. But I did use global_assumptions.add(Q.positive(J2)) global_assumption

[sympy] Re: How to implement an DifferentialOperator that can do this kind calculation

2018-10-14 Thread Yuxiang Wang
Hi all, Being curious - were there any follow-ups on this topic of creating a matrix of differential operators? Best, Shawn On Thursday, May 2, 2013 at 8:08:54 AM UTC-7, Saullo G. P. Castro wrote: > > The referred solution in Stackoverflow >

[sympy] Assumptions for integration (integrate over area)

2020-03-17 Thread Yuxiang Wang
Hi all, Not sure if sympy can do this, but wondering... I am integrating some quantities over area in Y-Z domain. In general, most part of the integrand is constant across the area. However, there sometimes are factors such as y, z, y**2, z**2. I would like to simply denote them as: Integratio

[sympy] SymPy cannot compute the laplace_transform of standard linear solid model

2015-03-21 Thread Yuxiang Wang
Dear all, Here is a code snippet that sympy just hangs: from sympy import symbols, exp from sympy.integrals import laplace_transform t, s = symbols('t, s') E1, E2, eta1 = symbols('E1, E2, eta1', positive=True) q0 = E1 * E2 / (E1 + E2) p1 = eta1 / (E1 + E2) q1 = E2 * eta1 / (E1 + E2) Yt

Re: [sympy] SymPy cannot compute the laplace_transform of standard linear solid model

2015-03-21 Thread Yuxiang Wang
Dear all, Sorry but please ignore the pen-and-paper solution - that was a different calculation that I accidentally pasted. The original problem still holds, though. Shawn On Mar 21, 2015 11:17 PM, "Yuxiang Wang" wrote: > Dear all, > > Here is a code snippet that sympy j

[sympy] Output sympy equation to word using mathml

2016-12-01 Thread Yuxiang Wang
(cross-posting between here and SO ) Dear all, It seems that MathML works OK with my word with simple copy and paste for strings such as http://www.w3.org/1998/Math/MathML";>12 But when I try to use symp

[sympy] Re: want to contribute.

2017-01-08 Thread Yuxiang Wang
Hi, You may find this guide very helpful: https://github.com/sympy/sympy/wiki/Introduction-to-contributing Shawn On Friday, January 6, 2017 at 4:01:26 PM UTC-8, De Shekhar wrote: > > Hi i am new to open source.I have reasonable knowledge of c++ , python , > linear algebra and calculus.How can

[sympy] Re: starting contributing with bug fix

2017-01-08 Thread Yuxiang Wang
Hi, You may find this guide very helpful: https://github.com/sympy/sympy/wiki/Introduction-to-contributing Shawn On Tuesday, December 27, 2016 at 11:09:29 AM UTC-8, Yathartha Joshi wrote: > > I m new to sympy but m willing to contribute in sympy by starting with bug > fixing. Can you tell how

[sympy] Re: Need some guidance!!

2017-01-08 Thread Yuxiang Wang
Hi, You may find this guide very helpful: https://github.com/sympy/sympy/wiki/Introduction-to-contributing Shawn On Friday, January 6, 2017 at 4:01:26 PM UTC-8, Akshay Mallipeddi wrote: > > Hello SymPy community, > I am new to the open source world. I > ha