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

laplacianFoam - Impose a Dirac delta source term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 1, 2019, 09:14
Default laplacianFoam - Impose a Dirac delta source term
  #1
New Member
 
Umberto
Join Date: Feb 2019
Location: Spain
Posts: 1
Rep Power: 0
umbi_more is on a distinguished road
Hello!


I am solving the following one dimensional problem
-k\frac{d^2 \lambda(x)}{dx^2}=f(x)\delta(x-x_0)
with BC
-k\frac{d \lambda(L)}{dx}+H\lambda(L)=0
-k\frac{d \lambda(-L)}{dx}=0
This problem has analytical solution and I am using it as a benchmark before moving to more complicate things. However, I do not manage to get it right.


What did untill now (assuming x_0 = 0) is to use laplacianFoam with the source term defined in fvOptions as
Code:
source1
{
    type            scalarSemiImplicitSource;
    active          true;
    selectionMode   points; // all, cellSet, cellZone, points
    volumeMode      specific; // absolute,specific
    points
    (
        (0 0 0)
    );
    injectionRateSuSp
    {
        T        (1.0  0);
    }
}
Where T=1.0 is the value of f(x) at x=0.


I have run it with the boundary conditions:
Code:
 dimensions [ 0 0 0 1 0 0 0 ];

internalField uniform 350;

boundaryField
{
  symmetryPlanes
  {
    type symmetry;
  }
  coldSide
  {
    type                groovyBC;
    variables           2("H=60.0;" "k=350.0;");
    valueExpression     "0.0"; ;
    gradientExpression  "0.0";
    fractionExpression  "1/(1+2*k/(H*mag(delta())))";
  }
  hotSide
  {
    type fixedGradient;
    gradient uniform 0;
  }
and the transport properties


Code:
DT              DT [ 0 2 -1 0 0 0 0] 350;
What I get is a solution that is constant for x<0 and linearly decreasing for x>0 which is what I expect but the values of the solution are wrong compared to the analytical solution. Moreover, I tried to solve on a 100 cell and 400 cell uniform grid and I got very different results even if the volumeMode is set to specific.


I thank you for any help or hint you can provide me.
Umberto
umbi_more is offline   Reply With Quote

Reply


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
Source Term due to evaporation in energy transport equation styleworker OpenFOAM Programming & Development 3 September 7, 2022 04:09
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 18:25
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 14, 2000 00:03
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 11, 2000 04:43


All times are GMT -4. The time now is 21:22.