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

Impose a flux at BC for the transport of a scalar

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2012, 11:08
Default Impose a flux at BC for the transport of a scalar
  #1
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi!

The problem looks very simple. I want to impose a flux at the inlet of a domain. My solver is made of an advective-diffusive equation :

Code:
fvScalarMatrix TEqn
(
fvm::ddt(T) + fvm::div(phi,T) -fvm::laplacian(DT,T)
);
I know that I can get the corresponding flux from TEqn.flux()
Code:
surfaceScalarField phiT = TEqn.flux();
How can I impose a value to this flux at the inlet of my domain ? In that case, the BC velocity is non-zero and consequently the usual trick using fixedGradient can't work. I thought of something like
Code:
 phiT.boundaryField()[patchID] == Q;
but this doesn't work (of course...)

May be something like
Code:
  (TEqn.flux()).boundaryField()[patchID] == Q;
(but it doesn't compile...)

Is anybody has an idea ??

Best regards,
Cyp
Cyp is offline   Reply With Quote

Old   March 28, 2012, 11:18
Default
  #2
Member
 
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 16
CedricVH is on a distinguished road
Giving a calculated value to a boundary can be achieved using the codedFixedValue boundary condition (http://www.openfoam.org/version2.0.0...me-control.php).
CedricVH is offline   Reply With Quote

Old   March 28, 2012, 14:05
Default
  #3
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Thank you for your reply.

Indeed I read the information about codedFixedValue, but I do not know how this can satisfy my request..

I think that imposing a flux should be a very easy thing in finite volume method..
Cyp is offline   Reply With Quote

Old   May 22, 2012, 16:04
Default
  #4
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 17
Arnoldinho is on a distinguished road
Hi Cyprien,

any progress so far? I'm struggling with the same problem for a couple of days now, but also have not yet found a way of directly imposing a flux. I need a flux and zero-flux boundary condition, but within the solver.

So far, in my case I could manage it with a source/sink term in the patch nearest cells, but that is not exactly what I wanted.

Greeting,
Arne
Arnoldinho 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
dieselFoam problem!! trying to introduce a new heat transfer model vivek070176 OpenFOAM Programming & Development 10 December 24, 2014 00:48
Solving N (Non-Coupled) Scalar Transport Equations joel.lehikoinen OpenFOAM Programming & Development 9 October 3, 2013 09:00
Scalar transport problem in Fluent? Ford Prefect FLUENT 0 September 30, 2011 08:03
Is it possible to use divergence in the source term of an scalar transport equation? jannnesss CFX 0 January 8, 2010 20:53
User-Defined Scalar convective flux Ola Nordblom FLUENT 3 March 19, 2001 10:59


All times are GMT -4. The time now is 16:07.