CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Source to drive velocity to zero

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 31, 2017, 07:54
Default Source to drive velocity to zero
  #1
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 23
philippose will become famous soon enough
Hello everybody,
A Good day to you all.

I have a quick question which I have been breaking my head over for a while now.

I need to simulate a case where depending on the flow through a patch, I need to increase or decrease the flow resistance at another location within the mesh, something like a variable orifice.

My intention is to do this without mesh morphing or topological changes, but rather, to use something like an "alpha" field to somehow drive the velocity at the right locations in the mesh to zero to emulate a blockage.

As of now, I have included the following source term into the Ueqn of a modified simpleFoam solver...:

Code:
    tmp<fvVectorMatrix> tUEqn
    (
        fvm::div(phi, U)
      + MRF.DDt(U)
      + turbulence->divDevReff(U)
      + fvm::Sp(alpha*max(mag(U)).value(), U)
     ==
        fvOptions(U)
    );
The part with the "fvm::Sp" is my additional source. My alpha field is a digital field.. either 0 or 1000.

The part:
Code:
 max(mag(U)).value()
Is only to get a resulting value which is dependent on the velocity.

The code seems to be working, but I dont see the velocity being driven down to zero.... it creates a kind of blockage, but I have had cases where even though the entire channel is blocked (alpha = 1000), I still have flow through, though, lesser than if there was no block.

However, my intention is to drive the velocity in all the cells where the alpha field is 1000 to zero.

Could someone please help me out?


Thank you.

Wish you a good afternoon ahead.

Regards,
Philippose
philippose is offline   Reply With Quote

Old   September 1, 2017, 05:53
Default
  #2
Senior Member
 
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 23
philippose will become famous soon enough
Hello again,
A Good Friday Morning to everyone :-)

So, I have basically solved the problem I had with injecting a source into the simulation to drive the velocity to zero at various locations.

It was a conceptual oversight on my part. It would be too involved to explain it here without going into the brackground, which would make this post too long and boring.

If anyone is interested, you can let me know, and I can try to explain the problem, and the potential solution.

Wish you all a good weekend ahead.

Regards,
Philippose
philippose is offline   Reply With Quote

Old   October 28, 2017, 13:17
Default
  #3
Member
 
Kristjan
Join Date: Apr 2017
Location: Slovenia
Posts: 36
Rep Power: 7
krikre is on a distinguished road
Hey!

I'm curious how you did it. I need simple solidification.

My solution was to iteratively correct the body force \textbf{b} in the pimple loop.
\textbf{b}_{n+1} =\textbf{b}_n - r \, \textbf{U}_n,
where r in [(\mathrm{N}/\mathrm{m}^3)/(\mathrm{m}/\mathrm{s})] is a relaxation factor.

But I don't think it's working right.
krikre is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 07:42
Problem compiling a custom Lagrangian library brbbhatti OpenFOAM Programming & Development 2 July 7, 2014 12:32
Trouble compiling utilities using source-built OpenFOAM Artur OpenFOAM Programming & Development 14 October 29, 2013 11:59
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 06:18


All times are GMT -4. The time now is 01:10.