time-dependent flow Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » time-dependent flow « Previous Next »

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

Britta Hagmeyer (britta)
Member
Username: britta

Post Number: 12
Registered: 11-2006
Posted on Friday, July 20, 2007 - 09:18 am:   

Hello everyone!

I want to model the velocity distribution in a 3D system over time with a time-dependent source, meaning the velocity with which the particles enter the system decreases over time. I've taken an example program from the ebook 'Fluid Dynamics by Finite Element Analysis'(fex293.pde, Flow through a Box with Two Orifices) and tried to modify it to be time-dependent, but the simulation did not work... could you please give me an example of a 3D time-dependent velocity distribution simulation? How do I have to change the 'velocity source' in the system?

Thanks a lot!
Cheers,
Britta
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 909
Registered: 06-2003
Posted on Saturday, July 21, 2007 - 01:24 pm:   

Backstrom shows the time-dependent form of the equations in many places, so the incorporation of the time derivative terms should be straightforward.

Fex293.pde uses the Stokes equation, in which the momentum terms have been dropped out. This is appropriate only for very low-speed flow, where the viscous terms dominate the momentum terms. If this is sufficient for your application, then the equations of fex293.pde are adequate.

The equations of fex293.pde modified for time-dependence are
vx: dens*dt(vx) +dx( p)- visc*div( grad( vx))=0
vy: dens*dt(vy) +dy( p)- visc*div( grad( vy))=0
vz: dens*dt(vz) +dz( p)- visc*div( grad( vz))=0

You can incorporate time dependent boundary conditions simply by writing expressions that depend on time.

However...
Your initial velocity distribution must be consistent with your initial boundary value or disaster will ensue.
1) If your initial velocity distribution is zero, you must start your boundary velocity specification at zero and ramp up to nonzero values.
2) If you want to start with non-zero boundary values, you must first solve a steady-state problem with those boundary values, and import the steady solution as initial values.

The modified form of fex293.pde is attached.
application/octet-stream
fex293t.pde (1.9 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Britta Hagmeyer (britta)
Member
Username: britta

Post Number: 13
Registered: 11-2006
Posted on Wednesday, July 25, 2007 - 10:20 am:   

Thanks for your fast reply!
I've included the TRANSFER statement into the program code and produced a transfer file. I've imported it into the time-dependent file and set the INITIAL VALUES of vx and vy to the vx and vy values obtained from the transfer file. I've changed the boundary condition for the velocity inlet as follows:
In the steady-state simulation, I've set value(vy) = 1e-3 and set value(vx) = 0. In the time-dependent simulation I've set value(vy) = (1e-3)+t and set value(vx) = 0.
You wrote that the initial velocity distribution must be consistent with the initial boundary value... for t = 0, the two value(vy) boundary conditions are the same. But still it's not working, and I cannot find the error in my train of thought. I hope you can help me!

I've got another question:
With these simulations I am able to calculate the velocity distribution of particles entering a system over time. In the next step I want to couple the particle transport in the system based on this velocity distribution with the particle transport based on diffusion (by Fick's 2nd law). That means, I want to calculate the time- and space-dependent particle concentration based on the concentration change induced by diffusive transport and by the particle velocity. How can I couple the concentration change according to Fick's 2nd law with the concentration change based on the particle velocity?

Thanks!

Cheers,
Britta

application/octet-streamsteady state
NavierStokes2D_steady_forum.pde (1.3 k)
application/octet-streamtime-dependent
NavierStokes2D_tDep_forum.pde (1.4 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 916
Registered: 06-2003
Posted on Wednesday, July 25, 2007 - 03:56 pm:   

You have a discontinuous velocity profile on the bottom edge, so you're not going to get away with NGRID=4. The discontinuity in principle requires an infinite number of cells to resolve. Numerical smearing will reduce this need to some finite number, but not 4. (See Help->Index->discontinuities).

I suggest you ask for tighter error tolerance in your steady-state problem, so it can refine the mesh around the discontinuity and get a clean velocity definition.

Then import this mesh into the time dependent problem as a starting mesh (TRANSFERMESH).

The failure was due to the fact that at NGRID=4 it was impossible to properly model the velocity distribution, so the first timestep was trying to do the same kind of jumps that the original problem did.

You also need a much smaller initial timestep, to avoid spending a lot of time retrying the first step.

The attached pair of files do these things and work correctly.
application/octet-stream
NSs.pde (1.3 k)
application/octet-stream
NSt.pde (1.4 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 917
Registered: 06-2003
Posted on Wednesday, July 25, 2007 - 04:28 pm:   

If the velocity profile you have just defined carries another material which diffuses as it flows, then you need a transport equation for the carried component (say C).

The fundamental conservation equation for C is
dt(C) + div(q) = 0
where q is the flux of quantity C.

The flux due to fluid motion is q = VC, with V the vector velocity (vx,vy)
Then Div(VC) = C*Div(V) + V.grad(C)
For an incompressible fluid, Div(V)=0, so
Div(VC) = V.Grad(C).

The flux due to material diffusion is
q = -K*GRAD(C)

The combined equation is then
dt(C) + V.grad(C) - Div(K*grad(C)) = source

This is very similar to the Navier-Stokes equation, with K playing the role of viscosity and the (probably zero) "source" analogous to grad(P).

But don't take my word for it. You should be able to find details of this treatment in many books and journals more immediate to your area of application.

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