Running time of program Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Running time of program « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Mehdi Naderi (mnader4)
Member
Username: mnader4

Post Number: 25
Registered: 12-2006
Posted on Sunday, November 18, 2007 - 11:58 am:   

Dear Mr. Nelson,
I will appreciate if you help me.
I attached my program (fluctuating beam). It solves fluid flow and heat transfer around the beam. In the present program I used about 750 cells. It is supposed to finished after 30 second.
It has been 3 days that the program is running but just 1/3 times passed.
Is there any way to reduce the time of running?
I need to increase the meash 5 times to capture better the velocity and temperature.
I think in this case the time will increase terribly.
Regards,
Mehdi
application/octet-streamFluctuating Beam
HTC.pde (4.8 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 998
Registered: 06-2003
Posted on Sunday, November 18, 2007 - 03:25 pm:   

There are several things wrong with this script, and I have not run it long enough to see the catastrophe that makes it run forever....

1) Your pressure equation is weird. I have replaced it with the equation from our samples. Your equation had no smoothing in it, so (coupled with the errors reported below) the pressure was probably oscillating in your run.

2) You have initialized your pressure variable at the ambient value of 100000. The real pressure variations are in fact much less than 1, so the pressure gradients are lost in roundoff relative to the initial value. The "pressure" variable is really a penalty function meant to enforce div(V)=0. The "real" pressure is meaningless. Initialize the pressure at 0 and compute variations only.

2) The THRESHOLD specification is meant to define the VARIATION that you wish to track accurately. The value you have given (100000) is many orders of magnitude greater than the actual variations in pressure, so it effectively turns off any error tracking on Pressure. Set this number at something reasonable, like 1e-6.

3) You are starting the configuration at the peak velocity of oscillation. The initial values are all at rest, then suddenly at time zero, the vane accelerates instantly to its peak velocity. This shock requires an infinitely small timestep to track accurately. It is important to start a time dependent problem with initial conditions which are mutually consistent. Instantaneous acceleration is not it. I have applied a time ramp function to the velocity, so that it starts out at zero. Another way would be to start the vane at its greatest deflection, when the velocity is zero.

4) You have no value boundary conditions on P. Strictly speaking, this makes the equation underdetermined. Since only derivatives are involved in the equation and BC's, P is really only defined within an additive constant. FlexPDE uses a perturbation method, and can sometimes survive this situation, but it is better to supply a value on some boundary to make the solution unique. I have forced P=0 on the top, right and bottom.

5) You are writing plots to disk and two Tecplot files every timestep. This is rather wasteful.
You can put Monitors every timestep, but you should write disk output less frequently.

The attached script seems to behave reasonably well. You might want to increase the mesh density at the tip.

application/octet-stream
HTC1.pde (5.2 k)

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration