Author |
Message |
Mehdi Naderi (mnader4)
Member Username: mnader4
Post Number: 57 Registered: 12-2006
| Posted on Monday, November 10, 2008 - 01:57 pm: | |
Dear Mr. Nelson, i am wondering if you help me. How can Flexpde integrate of a variable at a specific point of a geometry? for example: dt(S)=grad(temp)^2/temp^2+2000 where temp is temperature which can be solved in by conduction equation. I want to have time integration of S at a specific point (i.e. (0,0,0)) in a 3D geometry. But in Time_integral in Flexpde everything must be constant. The other thing I dont want to put that eqaution in the equation section of my program because I have to define boundary condition for S.
|
Marek Nelson (mgnelson)
Moderator Username: mgnelson
Post Number: 79 Registered: 07-2007
| Posted on Monday, November 10, 2008 - 04:35 pm: | |
You should be able to compute a time integral at a specific point as follows : S = TINTEGRAL( EVAL( expression, x, y, z) ) where expression is the equation you gave for dt(S) and x,y,z are the coordinates. Also, TINTEGRAL can integrate arbitrary scalar expressions, not just constants. |
Mehdi Naderi (mnader4)
Member Username: mnader4
Post Number: 58 Registered: 12-2006
| Posted on Tuesday, November 11, 2008 - 11:49 am: | |
Dear Mr. Nelson, Thank you. I applied that in my code and I got this: "a scalar value is required" Temperature in my code is a variable. S = TINTEGRAL( EVAL( grad(temp)^2/temp^2+2000 , 0, 0, 0) ) what should I do? Regards, mehdi |
Marek Nelson (mgnelson)
Moderator Username: mgnelson
Post Number: 81 Registered: 07-2007
| Posted on Tuesday, November 11, 2008 - 02:08 pm: | |
This should have worked. We will look into why FlexPDE rejected this statement. In the meantime, use VAL in place of EVAL and it will work correctly (I checked this on a my script). The difference between VAL and EVAL is that the coordinate location in VAL must be constant, whereas EVAL can have a spatially or temporally varying location. |
|