|June 5, 2010, 13:26||
Time-dependent pulsating source/sink in interFoam
Join Date: Jun 2010
Posts: 1Rep Power: 0
I am trying to model a time-dependent pulsating source/sink in interFoam.
The source/sink is of the form:
Source = SV * C * cos(f * t)
C is a coefficient
f is the frequency of the source/sink
SV is a volScalarField equal to 1 for the source cells and 0 otherwise.
All three are constant and given as input.
The source/sink is in the alpha1 = 1 zone.
My first approach was to change the interFoam solver as follows:
- definition of the source/sink
SV * Foam::cos(f * runTime.time().value())
fvm::laplacian(rUAf, p) == fvc::div(phi) – Source
MULES::explicitSolve(oneField(),alpha1, phi, phiAlpha, zeroField(),Source, 1, 0);
This seemed to work, but unfortunately I found that the overall (alpha1 = 1) mass of the system increases. Boundary Conditions are all slip type except one (the top side) which is an inlet/outlet for the alpha1 = 0 phase. The source/sink is a symmetric function and, during a full cycle, it extracts from the system as much mass as it introduces.
Therefore the overall (alpha1 = 1) mass of the system should remain constant.
I have also tried a number of variations, but with more or less the same results.
Can anyone help? What am I missing?
Thanks a million.
|June 24, 2010, 06:40||
Foam::cos(f * runTime.time().value()) - I think this is not working.
Info<< "Time = " << runTime.timeName() << nl << endl;
Source = SV * Foam::cos(f * runTime.time().value()); // This is working.
Last edited by Bugs; June 25, 2010 at 08:22.
|October 17, 2012, 08:17||
mass source in interDyMFoam
Join Date: Aug 2010
Posts: 20Rep Power: 7
I am trying to do the same but with moving meshes aka. interDyMFoam from OpenFOAM-2.0.x.
With a similar source definition but without changing anything in the gamma equation(!) everything seems fine if I do not move the mesh. (dynamicMotionSolverFvMesh but no motion specified in pointDisplacement.)
Moving the mesh leads to the maximum alpha1 value to grow over time, even when using Gamm01 or vanLeer01 schemes.
I do not really understand why a source should be influenced by the motion since the fluxes and divergence should still be valid but I am clearly missing something here.
Attempts to use limited Schemes did not help.
As previous posts show a change to MULES should be necessary, (but does the non-moving mesh case work fine?).
MULES::explicitSolve(rho,alpha1, phi, phiAlpha,Source,zeroField(), 1, 0);
For a moving mesh this also leads to alpha1 values increasing...
Any comments would be very much appreciated, I am happy to share any code or test case.
PS: After a weekend InterDyMFoam with a moving mesh also works in OF 2.1.x without changing the alpha equation..
Last edited by wavemaster; October 22, 2012 at 05:59. Reason: More testing:-)
|interfoam, pulsating, source, time dep. source term|
|Thread||Thread Starter||Forum||Replies||Last Post|
|time dependent problem||Adrian||FLUENT||6||October 14, 2008 22:24|
|Differences between serial and parallel runs||carsten||OpenFOAM Bugs||11||September 12, 2008 11:16|
|Modeling in micron scale using icoFoam||m9819348||OpenFOAM Running, Solving & CFD||7||October 27, 2007 00:36|
|Time dependent gate opening||krish||FLUENT||0||June 17, 2007 01:17|
|Time Dependent Solutions.||rakib||FLUENT||2||June 28, 2000 07:39|