OpenLB – Open Source Lattice Boltzmann Code Forums on OpenLB General Topics Slip-free and pressure corner boundary condition

Viewing 3 posts - 16 through 18 (of 18 total)
• Author
Posts
• #2782
jb
Member

Dear OLB team,

I have a question about the implementation of body forces.
What would be the most efficient way to implement a drag force (based on a drag coefficient) to certain lattice points? I think the problem is that I cannot use a linear force model, as the drag force is quadratic. What would you suggest is the most efficient way of implementing a drag force?

edit: I fixed it by making a new SmagorinskyQuadraticVelocityForcedBGKdynamics, by copying the original SmagorinskyLinearVelocityForcedBGKdynamics code and changing:

Code:
force[iDim] += v[jDim + iDim*nDim + nDim]*u[jDim][b]* std::abs(u[jDim])[/b];

Thank you very much for your help,
Juliaan

#2783
mathias
Keymaster

You mean a second force? I dont see the correlation the the fringe zone force. Any force can be added by force dynamics and a force descriptor -> see user guide. You may also write your own descriptor or dynamics if needed. Our spring school wold be a good start to learn that..

#2786
jb
Member

In certain locations I want to apply a drag force to the flow. I implemented it with forced dynamics and by modifying the external field. (Which is, if i’m correct, very similar to how the fringe region works?) I guess I was just confused at first because as a beginner with (Open)LB I thought a certain descriptor is defined for all lattice points, so I had SmagorinskyLinearVelocityForcedBGKdynamics for the whole domain. Now I have defined my own descriptor with external field and applied it to those locations with a drag force.

Viewing 3 posts - 16 through 18 (of 18 total)
• You must be logged in to reply to this topic.