CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Reading Velocity every timestep

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   July 2, 2012, 07:22
Default icoUncoupledKinematicParcelFoam solver for particles - read U each time step?
  #1
New Member
 
Join Date: Jul 2012
Posts: 1
Rep Power: 0
skimmilk is on a distinguished road
Hi,

So I'm new to using OpenFoam and C++, so pardon me if this is a very simple question. But so we've done some precomputation for the fluid fields, and they've been solved, and now I simply want to inject particles that will be affected by the said field. It's an uncoupled situation, and my mesh is dynamic (but that's already been solved, so that's not a big deal).

Anyways, so since it's uncoupled, I'm going with a lagrangian solver because I want the particle solution. Like I said, the fluid's been solved, and I can put together all the files using reconstructPar. So far, I've been able to leave out the particles and get the mesh to be read at each time step (I assume it's due to mesh.readUpdate() that I put in). I know it's fine because I can see the mesh moving the way I want in paraview. I cannot however, get U to update in the field each time. I'm basing my solver on icoUncoupledKinematicParcelFoam.

What I have tried is to put in a manual update each loop. I just copied and pasted the lines in the solver to recreate a new basicKinematicCollidingCloud each time. However, when I ran this, while the velocities looked right, my particles didn't move or age. I presume this is due to the cloud being recreated each time and the particles having to be reinjected into the new clouds at every step. I also tried changing the U into a non const field in the source code and then doing something like:

*(kinematicCloud.U()) = UatcurrentTimeStep

I think this is a good way to go, though I have been unsuccessful due to my lack of C++ experience.

Any help is appreciated! Thanks. OpenFoam 2.1.1

Last edited by skimmilk; July 3, 2012 at 02:23. Reason: changed title
skimmilk is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plotting Radial Velocity and Tangential Velocity in CFD Post ashtonJ CFX 2 April 24, 2012 04:30
Results of CFX Simulations Sof_70_Usthb CFX 3 July 9, 2011 06:15
Inlet Velocity in CFX aeroman CFX 12 August 6, 2009 18:42
maintaining a logarithmic velocity distribution Morten Andersen CFX 1 January 8, 2007 12:37
Velocity Under-relaxation in SIMPLE type methods Matt U. Main CFD Forum 6 July 4, 2005 05:29


All times are GMT -4. The time now is 03:23.