|
[Sponsors] |
January 6, 2016, 08:42 |
Fade-in fvOptions source
|
#1 |
Member
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11 |
Dear Foamers,
I would like to fade in a custom-made source term during the progress of the simulation. The momentum source is introduced with a new fvOptions-class. I tried the following (for simpleFoam first): The variable 'time' gives the time of the simulation and the variable 'factor' should be used to fade in the source term (after the fvOptions is switched to active after 100 iterations). Code:
const Time& time = mesh().time(); scalar factor = min( (time - 100)/10, 1); Questions: - 1) Is there a better approach? - 2) Should I 'convert' the 'Time'-type to sth. else? Regards, Peter |
|
January 6, 2016, 10:07 |
|
#2 |
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 19 |
Hi,
You might want to read the following thread regarding your question #2: http://www.cfd-online.com/Forums/ope...me-scalar.html Best regards, Fumiya
__________________
[Personal]
|
|
January 6, 2016, 10:14 |
|
#3 |
Member
Peter
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 57
Rep Power: 11 |
Dear Fumiya,
Thanks a lot!! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc | ofslcm | OpenFOAM Community Contributions | 25 | March 6, 2017 11:03 |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
[swak4Foam] funkySetFields compilation error | tayo | OpenFOAM Community Contributions | 39 | December 3, 2012 06:18 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
[Gmsh] Compiling gmshFoam with OpenFOAM-1.5 | BlGene | OpenFOAM Meshing & Mesh Conversion | 10 | August 6, 2009 05:26 |