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

exponentially decaying boundary condition

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 20, 2013, 03:51
Default exponentially decaying boundary condition
  #1
New Member
 
Sean McGinty
Join Date: Sep 2013
Posts: 4
Rep Power: 12
mcgintygs is on a distinguished road
I'm considering a simple diffusion problem using laplacianFoam and trying to add a simple boundary condition that decays exponentially with time, something like exp(-A*t), where A is some constant and t is time. My problem is concerned with the concentration, C, of some drug and so I have modified the standard laplacianFoam code to `C' rather than `T'.


Firstly, can anyone advise me how to set this up so that foam computes the boundary condition value at each new timestep?

Secondly, as a quick-fix attempt, I looked at

http://www.openfoam.org/version2.1.0...conditions.php

and tried to do this by tabulating some values.

My "C" file in the "0" folder looks like:


FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object C;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 -3 0 0 1 0 0];

internalField uniform 0;

boundaryField
{
impermeable
{
type zeroGradient;
}
source
{
type uniformFixedValue;
uniformValue table
(
(0 1)
(360 0.3)
);
}
defaultFaces
{
type empty;
}
}

Presumably the tabulation means that at time t=0 the value is 1 and at time 360 the value is 0.3? although this isn't clear at all from the link above. What value is taken at other times?

Anyway, the code seems to run, but I cannot view it in paraFoam - the error is

"ERROR: In /builddir/build/BUILD/ParaView-3.8.1/VTK/IO/vtkOpenFOAMReader.cxx, line 6349
vtkOpenFOAMReaderPrivate (0x3af1990):
Wrong list type for uniform field
"

I'm not sure if this a a problem with my code or simply the paraview.

Any help much appreciated
mcgintygs is offline   Reply With Quote

Old   September 20, 2013, 04:49
Default
  #2
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 14
ahmmedshakil is on a distinguished road
Hi,
Have tried with groovyBC: http://openfoamwiki.net/index.php/Contrib_groovyBC
ahmmedshakil is offline   Reply With Quote

Old   October 22, 2013, 00:31
Default
  #3
New Member
 
Jakob Hærvig
Join Date: Sep 2012
Location: Aalborg, Denmark
Posts: 27
Rep Power: 13
hrvig is on a distinguished road
Did you manage to solve this problem?
I am having the same problem
hrvig is offline   Reply With Quote

Old   October 28, 2013, 04:06
Default
  #4
New Member
 
Sean McGinty
Join Date: Sep 2013
Posts: 4
Rep Power: 12
mcgintygs is on a distinguished road
Yes, groovyBC did the job
mcgintygs 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
Domain Imbalance HMR CFX 5 October 10, 2016 05:57
Radiation interface hinca CFX 15 January 26, 2014 17:11
Error finding variable "THERMX" sunilpatil CFX 8 April 26, 2013 07:00
Setting outlet Pressure boundary condition using CAFFA code Mukund Pondkule Main CFD Forum 0 March 16, 2011 03:23
How exactly the "pressure outlet" bdry condition compute properties on the boundary? yating9901 FLUENT 3 June 28, 2010 12:26


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