|January 6, 2016, 08:42||
Fade-in fvOptions source
Join Date: Nov 2015
Location: Hamburg, Germany
Posts: 39Rep Power: 3
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).
const Time& time = mesh().time(); scalar factor = min( (time - 100)/10, 1);
- 1) Is there a better approach?
- 2) Should I 'convert' the 'Time'-type to sth. else?
|January 6, 2016, 10:07||
Join Date: Jun 2010
Location: Yokohama, Japan
Blog Entries: 1Rep Power: 10
You might want to read the following thread regarding your question #2:
|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|
|Problem compiling a custom Lagrangian library||brbbhatti||OpenFOAM Programming & Development||2||July 7, 2014 11:32|
|funkySetFields compilation error||tayo||OpenFOAM||39||December 3, 2012 06:18|
|Version 15 on Mac OS X||gschaider||OpenFOAM Installation||120||December 2, 2009 11:23|
|Compiling gmshFoam with OpenFOAM-1.5||BlGene||Open Source Meshers: Gmsh, Netgen, CGNS, ...||10||August 6, 2009 04:26|