Author |
Message |
Mehdi Naderi (mnader4)
New member Username: mnader4
Post Number: 1 Registered: 12-2006
| Posted on Sunday, February 18, 2007 - 07:02 pm: | |
Hi, Can I write a subroutine in FlexPDE? Can I add a loop in FlexPDE same as the other softwares (Fortran, Matlab,..)? What can I do if want to stop my program in a specifed time? Sincerely, Mehdi |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 769 Registered: 06-2003
| Posted on Monday, February 19, 2007 - 03:02 am: | |
The language of FlexPDE scripts is not a procedural language like Fortran. It is a "problem description" language, in which you describe the relationships in your system. From this, FlexPDE determines a strategy for solving the PDE system. Parameter definitions are by implication evaluated at all necessary nodes or quadrature points (ie, implicit loops). Definitions can reference other definitions (implicit subroutines). What is it that you wanted to put in your subroutine? And what did you want to put in your loop?
|
Mehdi Naderi (mnader4)
New member Username: mnader4
Post Number: 2 Registered: 12-2006
| Posted on Monday, February 19, 2007 - 10:53 am: | |
Hi, Thank you so much. I want to calculate a parameter (Damage in fatigue)which is summation of some parameters. Also, Damage in every sycle is related to previous Damage (D(i)=D(i-1)+Summation(A)). So, for finding the final damge I need to sum all of them. That was the reason of my question. Sincerely, Mehdi
|
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 770 Registered: 06-2003
| Posted on Monday, February 19, 2007 - 01:24 pm: | |
The definition you have given for D would appear to be an approximation to dt(D)=Summation(A). So make D a variable and let FlexPDE integrate it. |
Andres Lasagni (anla001)
New member Username: anla001
Post Number: 1 Registered: 03-2007
| Posted on Friday, March 16, 2007 - 02:03 pm: | |
Hi, I have a simmilar problem. One posibility to solve the problem would be using a "summation". I have a surface, where I want to calculate the integral along the time of a variable. But I want to see the value of the integral at each position of the surface (I do not want to integrate the value of the variable in all area). I have been trying to do this using the command T_Integral(variable), but I get the same result at all positions. How can I do this? The other posibility is if I can define something like: A(t) = A(t-1) + 1 where t denotes time How can I do it? Regards, Andrés |
Andres Lasagni (anla001)
New member Username: anla001
Post Number: 2 Registered: 03-2007
| Posted on Friday, March 16, 2007 - 02:37 pm: | |
Here there is file that can be used as example of what I want to do, and to see what I am obtaining. Regards, AndrésFlex PDE 3 - Thermal problem with summation Lasagni1.pde (2.2 k) |
|
Andres Lasagni (anla001)
Junior Member Username: anla001
Post Number: 3 Registered: 03-2007
| Posted on Friday, March 16, 2007 - 02:37 pm: | |
Here there is file that can be used as example of what I want to do, and to see what I am obtaining. Regards, Andrés |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 792 Registered: 06-2003
| Posted on Friday, March 16, 2007 - 03:47 pm: | |
TINTEGRAL is a scalar function, and does not produce a field of values. FlexPDE does not have a facility for solving for variables restricted to surfaces. You will have to define the variable everywhere and use only the values on the surface. Make A a VARIABLE and use the equation dt(A)=1 |
norainon (ainon)
New member Username: ainon
Post Number: 2 Registered: 07-2008
| Posted on Tuesday, July 22, 2008 - 10:28 pm: | |
how do i convert from fortran language into C++ language for the diagonal problem below? do 1 i=1,3*b+1 1 id(i)=(i-1)*b+1 ................................. read(5,500)(x(i),i=1,x) read(5,510)(y(i),s-x+1,x) what is READ means? .................................. regards, ainon
|