|
[Sponsors] |
initialization of scalar source using volume integral of source cells |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 22, 2013, 07:21 |
initialization of scalar source using volume integral of source cells
|
#1 |
Member
Marcus Letzel
Join Date: Sep 2012
Location: Bremen
Posts: 35
Rep Power: 13 |
Dear All,
my modified pisoFoam solver includes a passive scalar transport equation for LES: Code:
... turbulence->correct(); solve ( fvm::ddt(s1) + fvm::div(phi, s1) - fvm::laplacian(turbulence->nut(), s1) == s1Source ); runTime.write(); ... Code:
volScalarField s1 ( IOobject ( "s1", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("s1", dimensionSet(1,-3,0,0,0,0,0), scalar(0)) ); Info<< "Reading field s1Source\n" << endl; volScalarField s1Source ( IOobject ( "s1Source", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("s1Source", dimensionSet(1,-3,-1,0,0,0,0), scalar(0)) ); So far, I initialize s1Source using a region in setFieldsDict: Code:
boxToCell { box (35.75 0.0 27.5) (36.25 0.5 28.5); fieldValues ( volScalarFieldValue s1Source 0.001 ); }; Instead, I need an algorithm that sets s1Source in these cells to values so that the volume integral of s1Source over these cells matches a prescribed total emission rate. Can this be achieved using setFields, or perhaps funkySetFields? If not, how and in which file could it be coded? Best regards, Marcus |
|
March 24, 2013, 10:33 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
If you don't want to change the solver anymore there is always the possibility to modify the s1-field with the modifyField-functionObject
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 13, 2015, 03:58 |
|
#3 | |
Member
Yan Wang
Join Date: May 2015
Location: Beijing
Posts: 41
Rep Power: 10 |
Quote:
I met the same problem. Did you find any solution? Thank you! |
||
|
|
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 10:03 |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 16:02 |
friction forces icoFoam | ofslcm | OpenFOAM | 3 | April 7, 2012 10:57 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 17:18 |
physical boundary error!! | kris | Siemens | 2 | August 3, 2005 00:32 |