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

refCell for Laplacian in a periodic box

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2016, 10:50
Exclamation refCell for Laplacian in a periodic box
  #1
Member
 
Join Date: Aug 2012
Posts: 33
Rep Power: 14
gigilentini8 is on a distinguished road
Hi all,

I am solving a simple diffusion problem on a periodic (cyclic condition) box with regular grids.
I start from random values in each cell (either as initial condition or source term in steady diffusion) and I let the Laplacian do the smoothing it is supposed to do

everything works as expected, apart that strange over(under-)shoots appear in the cell where I set my reference value (needed of course due to periodicity), in a consistent way. i.e., I repeated several times with different random seeds and realisations and the values at the refCell or refPoint are always much lower or much larger than the rest of the domain.

It looks like the reference values are not exactly doing their job.
I am using all linear uncorrected schemes and OF 4.x

any clue on how to solve this?

my code is as simple as this
Code:
    while (simple.loop())
    {
           fvScalarMatrix TEqn  (
                fvm::ddt(T) - fvm::laplacian(DT, T) +  fvOptions(T)
                == -ff
            );

        TEqn.relax();
        TEqn.setReference(TRefCell, TRefValue);
        fvOptions.constrain(TEqn);
	      TEqn.solve();
		    fvOptions.correct(T);
        }
gigilentini8 is offline   Reply With Quote

Old   November 5, 2016, 11:08
Default Solved!
  #2
Member
 
Join Date: Aug 2012
Posts: 33
Rep Power: 14
gigilentini8 is on a distinguished road
Ok, the problem was just that I was smoothing so much that the mismatch I saw between the refPoint and the rest of the domain was maybe a real effect due to the statistical error

with much smaller diffusion coefficient, I can get a nice smooth Gaussian Random Field
Attached Images
File Type: png grf.png (127.9 KB, 5 views)
gigilentini8 is offline   Reply With Quote

Reply

Tags
cyclic, laplacian operator, laplacianfoam, refcell, refvalue


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
cyclicAMI and interDyMFoam for periodic box kwardle OpenFOAM 1 March 11, 2014 14:40
[GAMBIT] periodic faces not matching Aadhavan ANSYS Meshing & Geometry 6 August 31, 2013 12:25
Initial Velocity Field - 2D Turbulence in a Periodic Box AHutchison OpenFOAM Running, Solving & CFD 0 May 28, 2013 01:18
HELP! Periodic Problem foxer FLUENT 1 June 27, 2012 09:00
[ICEM] how to define periodic in icem ? mingersai ANSYS Meshing & Geometry 1 February 3, 2012 18:46


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