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

Time-dependent pulsating source/sink in interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 5, 2010, 14:26
Default Time-dependent pulsating source/sink in interFoam
  #1
New Member
 
Join Date: Jun 2010
Location: Dublin
Posts: 1
Rep Power: 0
paddy.ovan is on a distinguished road
Hi there,

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)

where:
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

volScalarField Source
(
"Source",
SV * Foam::cos(f * runTime.time().value())
);

- pEqn

fvm::laplacian(rUAf, p) == fvc::div(phi) – Source

- alphaEqn

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.
Regards
Paddy
__________________
Paddy O'Van
Dublin
paddy.ovan is offline   Reply With Quote

Old   June 24, 2010, 07:40
Default
  #2
New Member
 
Andrey Pridannikov
Join Date: Jun 2010
Location: SUSU, Chelyabinsk, Russia
Posts: 2
Rep Power: 0
Bugs is on a distinguished road
Send a message via Skype™ to Bugs
createField.H:

Foam::cos(f * runTime.time().value()) - I think this is not working.
__________________________________________________ __________________________

<solver>.C:

while (runTime.loop())
{
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 09:22.
Bugs is offline   Reply With Quote

Old   October 17, 2012, 09:17
Default mass source in interDyMFoam
  #3
New Member
 
Pal Schmitt
Join Date: Aug 2010
Location: Belfast
Posts: 21
Rep Power: 16
wavemaster is on a distinguished road
Hi,
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.
Cheers,
Pal

PS: After a weekend InterDyMFoam with a moving mesh also works in OF 2.1.x without changing the alpha equation..
Attached Images
File Type: jpg masssource.jpg (12.4 KB, 37 views)

Last edited by wavemaster; October 22, 2012 at 06:59. Reason: More testing:-)
wavemaster is offline   Reply With Quote

Reply

Tags
interfoam, pulsating, source, time dep. source term


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
time dependent problem Adrian FLUENT 6 October 14, 2008 23:24
Differences between serial and parallel runs carsten OpenFOAM Bugs 11 September 12, 2008 12:16
Modeling in micron scale using icoFoam m9819348 OpenFOAM Running, Solving & CFD 7 October 27, 2007 01:36
Time dependent gate opening krish FLUENT 0 June 17, 2007 02:17
Time Dependent Solutions. rakib FLUENT 2 June 28, 2000 08:39


All times are GMT -4. The time now is 11:17.