|
[Sponsors] |
November 19, 2013, 05:48 |
wavetransmissive localEuler
|
#1 |
Member
Join Date: Nov 2012
Posts: 83
Rep Power: 13 |
hi,
i made some modification on the wavetransmissive/advective Bc to include the localEuler ddt scheme: it is based on the thread( and 2 links for local Euler for rhoCentralFoam): http://www.cfd-online.com/Forums/ope...-openfoam.html http://www.cfd-online.com/Forums/ope...nge-kutta.html Code:
--- ../OpenFOAM-2.1.1/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C +++ /opt/openfoam211/src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C @@ -30,6 +30,7 @@ #include "EulerDdtScheme.H" #include "CrankNicholsonDdtScheme.H" #include "backwardDdtScheme.H" +#include "localEulerDdtScheme.H" //add // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ line 215 ++@@ scalarField alpha(w*deltaT*this->patch().deltaCoeffs()); // removed the const label patchi = this->patch().index(); // Non-reflecting outflow boundary // If lInf_ defined setup relaxation to the value fieldInf_. if (lInf_ > SMALL) { // Calculate the field relaxation coefficient k (See notes) scalarField k(w*deltaT/lInf_); // removed the const @@ line 251++@@ //insert this: else if (ddtScheme == fv::localEulerDdtScheme<scalar>::typeName) { // only works with rDeltaT hardcoded const volScalarField& vsfrDeltaT = this->db().objectRegistry::lookupObject<volScalarField>("rDeltaT"); const scalarField& prDeltaT = vsfrDeltaT.boundaryField()[patchi]; scalarField alpha(w/prDeltaT*this->patch().deltaCoeffs()); scalarField k(w/prDeltaT/lInf_); this->refValue() = ( field.oldTime().boundaryField()[patchi] + k*fieldInf_ )/(1.0 + k); this->valueFraction() = (1.0 + k)/(1.0 + alpha + k); } @@ line 295++@@ //insert this: else if (ddtScheme == fv::localEulerDdtScheme<scalar>::typeName) { // only works with rDeltaT hardcoded const volScalarField& vsfrDeltaT = this->db().objectRegistry::lookupObject<volScalarField>("rDeltaT"); const scalarField& prDeltaT = vsfrDeltaT.boundaryField()[patchi]; scalarField alpha(w/prDeltaT*this->patch().deltaCoeffs()); this->refValue() = field.oldTime().boundaryField()[patchi]; this->valueFraction() = 1.0/(1.0 + alpha); } dont forget to make a backup before before compiling Best regards Henning Last edited by Henning86; November 23, 2013 at 13:47. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenFOAM: MRFSimpleFOAM with waveTransmissive | hm86 | OpenFOAM Running, Solving & CFD | 1 | October 12, 2014 02:17 |
[swak4Foam] how to use waveTransmissive in groovyBC? | immortality | OpenFOAM Community Contributions | 4 | January 28, 2013 08:31 |
are advecive and waveTransmissive different? | immortality | OpenFOAM Running, Solving & CFD | 0 | January 25, 2013 20:04 |
Could you help me about how to use the waveTransmissive BC for sound wave? | zhongsy | OpenFOAM | 0 | July 13, 2012 03:59 |
WaveTransmissive BC with fieldInf%3d1 | schmidt_d | OpenFOAM Running, Solving & CFD | 1 | February 8, 2011 07:09 |