|August 30, 2012, 18:02||
Modeling delta function as source
Join Date: Mar 2009
Location: Champaign, Illinois, U.S.A
Posts: 208Rep Power: 11
I would like to know if it is possible to include a delta function as
a source term in OpenFOAM. For instance, I would like to implement,
div(a*gradient(phi)) = -a_0*(c+(d*delta(x-x_c)))
where x_c is the position corresponding to the nodal point where delta
function is singular and the position changes at every time step.
Please let me know if we can implement this in OpenFOAM.
|February 27, 2015, 13:42||
Join Date: Feb 2014
Posts: 24Rep Power: 5
I assume, that you mean the dirac distribution by delta(x-x0).
You can approximate delta by a field that has the value 1/V in the grid cell containing x0 and 0 elsewhere, resulting in:
For a more accurate solution you may need to implement a jump boundary condition and split your mesh on each "side" of x0.
|February 28, 2015, 09:37||
Join Date: Aug 2014
Posts: 199Rep Power: 4
You can create a volScalarField filled with 0s. Then loop over the cells and check which one of them satisfy the delta condition, so that you can change their values to 1
|Thread||Thread Starter||Forum||Replies||Last Post|
|groovyBC in openFOAM-2.0 for parabolic velocity bc||ofslcm||OpenFOAM Pre-Processing||25||March 6, 2017 11:03|
|wmake compiling new solver||mksca||OpenFOAM Programming & Development||13||August 18, 2014 22:26|
|Compiling gmshFoam with OpenFOAM-1.5||BlGene||Open Source Meshers: Gmsh, Netgen, CGNS, ...||10||August 6, 2009 04:26|
|Compilation errors in ThirdPartymallochoard||feng_w||OpenFOAM Installation||1||January 25, 2009 07:59|
|Problem with compile the setParabolicInlet||ivanyao||OpenFOAM Running, Solving & CFD||6||September 5, 2008 20:50|