Merge remote branch 'OpenCFD/master' into olesenm

Conflicts:
	tutorials/incompressible/simpleFoam/pitzDaily/system/controlDict
This commit is contained in:
Mark Olesen
2010-04-09 14:21:34 +02:00
12 changed files with 164 additions and 158 deletions

View File

@ -518,11 +518,28 @@ bool Foam::Time::loop()
if (running) if (running)
{ {
operator++(); if (!subCycling_)
{
readModifiedObjects();
if (timeIndex_ == startTimeIndex_)
{
functionObjects_.start();
}
else
{
functionObjects_.execute();
}
}
// Check update the "running" status following the "++" operation // Check update the "running" status following the "++" operation
// to take into account possible side-effects from functionObjects // to take into account possible side-effects from functionObjects
running = run(); running = run();
if (running)
{
operator++();
}
} }
return running; return running;
@ -667,20 +684,6 @@ Foam::Time& Foam::Time::operator+=(const scalar deltaT)
Foam::Time& Foam::Time::operator++() Foam::Time& Foam::Time::operator++()
{ {
if (!subCycling_)
{
readModifiedObjects();
if (timeIndex_ == startTimeIndex_)
{
functionObjects_.start();
}
else
{
functionObjects_.execute();
}
}
deltaT0_ = deltaTSave_; deltaT0_ = deltaTSave_;
deltaTSave_ = deltaT_; deltaTSave_ = deltaT_;

View File

@ -39,6 +39,7 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel(CloudType& owner)
owner_(owner), owner_(owner),
g_(dimensionedVector("zero", dimAcceleration, vector::zero)), g_(dimensionedVector("zero", dimAcceleration, vector::zero)),
coeffDict_(dictionary::null), coeffDict_(dictionary::null),
active_(false),
injectorCellsPatch_(0), injectorCellsPatch_(0),
massParcelPatch_(0), massParcelPatch_(0),
diameterParcelPatch_(0), diameterParcelPatch_(0),
@ -62,6 +63,7 @@ Foam::SurfaceFilmModel<CloudType>::SurfaceFilmModel
owner_(owner), owner_(owner),
g_(g), g_(g),
coeffDict_(dict.subDict(type + "Coeffs")), coeffDict_(dict.subDict(type + "Coeffs")),
active_(true),
injectorCellsPatch_(0), injectorCellsPatch_(0),
massParcelPatch_(0), massParcelPatch_(0),
diameterParcelPatch_(0), diameterParcelPatch_(0),
@ -85,6 +87,11 @@ template<class CloudType>
template<class TrackData> template<class TrackData>
void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td)
{ {
if (!active_)
{
return;
}
// Retrieve the film model from the owner database // Retrieve the film model from the owner database
const surfaceFilmModels::surfaceFilmModel& filmModel = const surfaceFilmModels::surfaceFilmModel& filmModel =
this->owner().db().objectRegistry::lookupObject this->owner().db().objectRegistry::lookupObject

View File

@ -79,6 +79,9 @@ protected:
//- The coefficients dictionary //- The coefficients dictionary
const dictionary coeffDict_; const dictionary coeffDict_;
//- Active flag
bool active_;
// Cached injector fields per film patch // Cached injector fields per film patch

View File

@ -21,433 +21,433 @@ FoamFile
{ {
type patch; type patch;
nFaces 320; nFaces 320;
startFace 1016673; startFace 955219;
} }
inlet inlet
{ {
type patch; type patch;
nFaces 64; nFaces 64;
startFace 1016993; startFace 955539;
} }
outlet outlet
{ {
type patch; type patch;
nFaces 64; nFaces 64;
startFace 1017057; startFace 955603;
} }
lowerWall lowerWall
{ {
type wall; type wall;
nFaces 5330; nFaces 5330;
startFace 1017121; startFace 955667;
} }
upperWall upperWall
{ {
type patch; type patch;
nFaces 160; nFaces 160;
startFace 1022451; startFace 960997;
} }
motorBike_frt-fairing:001%1 motorBike_frt-fairing:001%1
{ {
type wall; type wall;
nFaces 6626; nFaces 6595;
startFace 1022611; startFace 961157;
} }
motorBike_windshield:002%2 motorBike_windshield:002%2
{ {
type wall; type wall;
nFaces 50; nFaces 50;
startFace 1029237; startFace 967752;
} }
motorBike_rr-wh-rim:005%5 motorBike_rr-wh-rim:005%5
{ {
type wall; type wall;
nFaces 181; nFaces 178;
startFace 1029287; startFace 967802;
} }
motorBike_rr-wh-rim:010%10 motorBike_rr-wh-rim:010%10
{ {
type wall; type wall;
nFaces 340; nFaces 340;
startFace 1029468; startFace 967980;
} }
motorBike_fr-wh-rim:011%11 motorBike_fr-wh-rim:011%11
{ {
type wall; type wall;
nFaces 474; nFaces 474;
startFace 1029808; startFace 968320;
} }
motorBike_fr-wh-brake-disk:012%12 motorBike_fr-wh-brake-disk:012%12
{ {
type wall; type wall;
nFaces 54; nFaces 54;
startFace 1030282; startFace 968794;
} }
motorBike_frame:016-shadow%13 motorBike_frame:016-shadow%13
{ {
type wall; type wall;
nFaces 131; nFaces 128;
startFace 1030336; startFace 968848;
} }
motorBike_rear-susp:014%14 motorBike_rear-susp:014%14
{ {
type wall; type wall;
nFaces 1073; nFaces 1080;
startFace 1030467; startFace 968976;
} }
motorBike_rear-susp:014-shadow%15 motorBike_rear-susp:014-shadow%15
{ {
type wall; type wall;
nFaces 159; nFaces 149;
startFace 1031540; startFace 970056;
} }
motorBike_frame:016%16 motorBike_frame:016%16
{ {
type wall; type wall;
nFaces 20; nFaces 30;
startFace 1031699; startFace 970205;
} }
motorBike_rr-wh-rim:005-shadow%17 motorBike_rr-wh-rim:005-shadow%17
{ {
type wall; type wall;
nFaces 25; nFaces 27;
startFace 1031719; startFace 970235;
} }
motorBike_rr-wh-chain-hub:022%22 motorBike_rr-wh-chain-hub:022%22
{ {
type wall; type wall;
nFaces 141; nFaces 141;
startFace 1031744; startFace 970262;
} }
motorBike_rearseat%24 motorBike_rearseat%24
{ {
type wall; type wall;
nFaces 432; nFaces 432;
startFace 1031885; startFace 970403;
} }
motorBike_frt-fairing%25 motorBike_frt-fairing%25
{ {
type wall; type wall;
nFaces 626; nFaces 626;
startFace 1032317; startFace 970835;
} }
motorBike_windshield%26 motorBike_windshield%26
{ {
type wall; type wall;
nFaces 428; nFaces 432;
startFace 1032943; startFace 971461;
} }
motorBike_headlights%27 motorBike_headlights%27
{ {
type wall; type wall;
nFaces 161; nFaces 161;
startFace 1033371; startFace 971893;
} }
motorBike_driversseat%28 motorBike_driversseat%28
{ {
type wall; type wall;
nFaces 367; nFaces 367;
startFace 1033532; startFace 972054;
} }
motorBike_rear-body%29 motorBike_rear-body%29
{ {
type wall; type wall;
nFaces 2076; nFaces 2076;
startFace 1033899; startFace 972421;
} }
motorBike_fuel-tank%30 motorBike_fuel-tank%30
{ {
type wall; type wall;
nFaces 912; nFaces 912;
startFace 1035975; startFace 974497;
} }
motorBike_exhaust%31 motorBike_exhaust%31
{ {
type wall; type wall;
nFaces 2391; nFaces 2390;
startFace 1036887; startFace 975409;
} }
motorBike_rr-wh-rim%32 motorBike_rr-wh-rim%32
{ {
type wall; type wall;
nFaces 1430; nFaces 1430;
startFace 1039278; startFace 977799;
} }
motorBike_fr-mud-guard%33 motorBike_fr-mud-guard%33
{ {
type wall; type wall;
nFaces 767; nFaces 758;
startFace 1040708; startFace 979229;
} }
motorBike_fr-wh-rim%34 motorBike_fr-wh-rim%34
{ {
type wall; type wall;
nFaces 592; nFaces 591;
startFace 1041475; startFace 979987;
} }
motorBike_fr-wh-brake-disk%35 motorBike_fr-wh-brake-disk%35
{ {
type wall; type wall;
nFaces 533; nFaces 534;
startFace 1042067; startFace 980578;
} }
motorBike_fr-brake-caliper%36 motorBike_fr-brake-caliper%36
{ {
type wall; type wall;
nFaces 164; nFaces 164;
startFace 1042600; startFace 981112;
} }
motorBike_fr-wh-tyre%37 motorBike_fr-wh-tyre%37
{ {
type wall; type wall;
nFaces 1118; nFaces 1116;
startFace 1042764; startFace 981276;
} }
motorBike_hbars%38 motorBike_hbars%38
{ {
type wall; type wall;
nFaces 535; nFaces 535;
startFace 1043882; startFace 982392;
} }
motorBike_fr-forks%39 motorBike_fr-forks%39
{ {
type wall; type wall;
nFaces 1144; nFaces 1143;
startFace 1044417; startFace 982927;
} }
motorBike_chain%40 motorBike_chain%40
{ {
type wall; type wall;
nFaces 474; nFaces 474;
startFace 1045561; startFace 984070;
} }
motorBike_rr-wh-tyre%41 motorBike_rr-wh-tyre%41
{ {
type wall; type wall;
nFaces 1785; nFaces 1786;
startFace 1046035; startFace 984544;
} }
motorBike_square-dial%42 motorBike_square-dial%42
{ {
type wall; type wall;
nFaces 6; nFaces 6;
startFace 1047820; startFace 986330;
} }
motorBike_round-dial%43 motorBike_round-dial%43
{ {
type wall; type wall;
nFaces 18; nFaces 17;
startFace 1047826; startFace 986336;
} }
motorBike_dial-holder%44 motorBike_dial-holder%44
{ {
type wall; type wall;
nFaces 87; nFaces 87;
startFace 1047844; startFace 986353;
} }
motorBike_rear-susp%45 motorBike_rear-susp%45
{ {
type wall; type wall;
nFaces 1787; nFaces 1786;
startFace 1047931; startFace 986440;
} }
motorBike_rear-brake-lights%46 motorBike_rear-brake-lights%46
{ {
type wall; type wall;
nFaces 54; nFaces 54;
startFace 1049718; startFace 988226;
} }
motorBike_rear-light-bracket%47 motorBike_rear-light-bracket%47
{ {
type wall; type wall;
nFaces 163; nFaces 163;
startFace 1049772; startFace 988280;
} }
motorBike_frame%48 motorBike_frame%48
{ {
type wall; type wall;
nFaces 2040; nFaces 2040;
startFace 1049935; startFace 988443;
} }
motorBike_rear-mud-guard%49 motorBike_rear-mud-guard%49
{ {
type wall; type wall;
nFaces 804; nFaces 798;
startFace 1051975; startFace 990483;
} }
motorBike_rear-susp-spring-damp%50 motorBike_rear-susp-spring-damp%50
{ {
type wall; type wall;
nFaces 125; nFaces 124;
startFace 1052779; startFace 991281;
} }
motorBike_fairing-inner-plate%51 motorBike_fairing-inner-plate%51
{ {
type wall; type wall;
nFaces 446; nFaces 446;
startFace 1052904; startFace 991405;
} }
motorBike_clutch-housing%52 motorBike_clutch-housing%52
{ {
type wall; type wall;
nFaces 966; nFaces 964;
startFace 1053350; startFace 991851;
} }
motorBike_radiator%53 motorBike_radiator%53
{ {
type wall; type wall;
nFaces 48; nFaces 58;
startFace 1054316; startFace 992815;
} }
motorBike_water-pipe%54 motorBike_water-pipe%54
{ {
type wall; type wall;
nFaces 103; nFaces 103;
startFace 1054364; startFace 992873;
} }
motorBike_water-pump%55 motorBike_water-pump%55
{ {
type wall; type wall;
nFaces 74; nFaces 74;
startFace 1054467; startFace 992976;
} }
motorBike_engine%56 motorBike_engine%56
{ {
type wall; type wall;
nFaces 2384; nFaces 2389;
startFace 1054541; startFace 993050;
} }
motorBike_rear-shock-link%57 motorBike_rear-shock-link%57
{ {
type wall; type wall;
nFaces 29; nFaces 28;
startFace 1056925; startFace 995439;
} }
motorBike_rear-brake-fluid-pot-bracket%58 motorBike_rear-brake-fluid-pot-bracket%58
{ {
type wall; type wall;
nFaces 59; nFaces 59;
startFace 1056954; startFace 995467;
} }
motorBike_rear-brake-fluid-pot%59 motorBike_rear-brake-fluid-pot%59
{ {
type wall; type wall;
nFaces 53; nFaces 53;
startFace 1057013; startFace 995526;
} }
motorBike_footpeg%60 motorBike_footpeg%60
{ {
type wall; type wall;
nFaces 87; nFaces 87;
startFace 1057066; startFace 995579;
} }
motorBike_rr-wh-chain-hub%61 motorBike_rr-wh-chain-hub%61
{ {
type wall; type wall;
nFaces 145; nFaces 143;
startFace 1057153; startFace 995666;
} }
motorBike_rear-brake-caliper%62 motorBike_rear-brake-caliper%62
{ {
type wall; type wall;
nFaces 142; nFaces 142;
startFace 1057298; startFace 995809;
} }
motorBike_rider-helmet%65 motorBike_rider-helmet%65
{ {
type wall; type wall;
nFaces 583; nFaces 583;
startFace 1057440; startFace 995951;
} }
motorBike_rider-visor%66 motorBike_rider-visor%66
{ {
type wall; type wall;
nFaces 95; nFaces 95;
startFace 1058023; startFace 996534;
} }
motorBike_rider-boots%67 motorBike_rider-boots%67
{ {
type wall; type wall;
nFaces 1025; nFaces 1025;
startFace 1058118; startFace 996629;
} }
motorBike_rider-gloves%68 motorBike_rider-gloves%68
{ {
type wall; type wall;
nFaces 320; nFaces 320;
startFace 1059143; startFace 997654;
} }
motorBike_rider-body%69 motorBike_rider-body%69
{ {
type wall; type wall;
nFaces 4555; nFaces 4555;
startFace 1059463; startFace 997974;
} }
motorBike_frame:0%70 motorBike_frame:0%70
{ {
type wall; type wall;
nFaces 37; nFaces 37;
startFace 1064018; startFace 1002529;
} }
motorBike_frt-fairing:001-shadow%74 motorBike_frt-fairing:001-shadow%74
{ {
type wall; type wall;
nFaces 1274; nFaces 1301;
startFace 1064055; startFace 1002566;
} }
motorBike_windshield-shadow%75 motorBike_windshield-shadow%75
{ {
type wall; type wall;
nFaces 101; nFaces 97;
startFace 1065329; startFace 1003867;
} }
motorBike_fr-mud-guard-shadow%81 motorBike_fr-mud-guard-shadow%81
{ {
type wall; type wall;
nFaces 129; nFaces 140;
startFace 1065430; startFace 1003964;
} }
motorBike_fr-wh-brake-disk-shadow%83 motorBike_fr-wh-brake-disk-shadow%83
{ {
type wall; type wall;
nFaces 77; nFaces 76;
startFace 1065559; startFace 1004104;
} }
motorBike_rear-mud-guard-shadow%84 motorBike_rear-mud-guard-shadow%84
{ {
type wall; type wall;
nFaces 138; nFaces 137;
startFace 1065636; startFace 1004180;
} }
motorBike_rear-susp-spring-damp-shadow%85 motorBike_rear-susp-spring-damp-shadow%85
{ {
type wall; type wall;
nFaces 15; nFaces 15;
startFace 1065774; startFace 1004317;
} }
motorBike_radiator-shadow%86 motorBike_radiator-shadow%86
{ {
type wall; type wall;
nFaces 12; nFaces 4;
startFace 1065789; startFace 1004332;
} }
motorBike_rear-shock-link-shadow%87 motorBike_rear-shock-link-shadow%87
{ {
type wall; type wall;
nFaces 7; nFaces 8;
startFace 1065801; startFace 1004336;
} }
motorBike_rear-brake-fluid-pot-bracket-shadow%88 motorBike_rear-brake-fluid-pot-bracket-shadow%88
{ {
type wall; type wall;
nFaces 6; nFaces 5;
startFace 1065808; startFace 1004344;
} }
motorBike_rr-wh-chain-hub-shadow%89 motorBike_rr-wh-chain-hub-shadow%89
{ {
type wall; type wall;
nFaces 24; nFaces 27;
startFace 1065814; startFace 1004349;
} }
) )

View File

@ -18,13 +18,13 @@ libs ("libincompressibleRASModels.so");
application simpleFoam; application simpleFoam;
startFrom latestTime; startFrom startTime;
startTime 0; startTime 0;
stopAt endTime; stopAt endTime;
endTime 500; endTime 1000;
deltaT 1; deltaT 1;

View File

@ -24,7 +24,6 @@ gradSchemes
default Gauss linear; default Gauss linear;
grad(p) Gauss linear; grad(p) Gauss linear;
grad(U) Gauss linear; grad(U) Gauss linear;
//grad(U) cellLimited Gauss linear 1;
} }
divSchemes divSchemes
@ -38,20 +37,17 @@ divSchemes
laplacianSchemes laplacianSchemes
{ {
default Gauss linear corrected; default Gauss linear limited 0.333;
//default Gauss linear limited 0.5;
//default Gauss linear limited 0.333;
} }
interpolationSchemes interpolationSchemes
{ {
default linear; default linear;
interpolate(U) linear;
} }
snGradSchemes snGradSchemes
{ {
default corrected; default limited 0.333;
} }
fluxRequired fluxRequired

View File

@ -47,6 +47,21 @@ runTimeModifiable true;
functions functions
{ {
convergenceChecks
{
type residualControl;
functionObjectLibs ( "libresidualControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
{
p 1e-2;
U 1e-3;
"(k|epsilon|omega)" 1e-3;
}
}
streamLines streamLines
{ {
type streamLine; type streamLine;
@ -58,7 +73,7 @@ functions
outputControl outputTime; outputControl outputTime;
// outputInterval 10; // outputInterval 10;
setFormat vtk;//gnuplot;//xmgr; //raw; //gnuplot; //jplot; setFormat vtk; //gnuplot; //xmgr; //raw; //jplot;
// Velocity field to use for tracking. // Velocity field to use for tracking.
U U; U U;
@ -87,24 +102,6 @@ functions
end (-0.0205 0.0251 0.00001); end (-0.0205 0.0251 0.00001);
nPoints 10; nPoints 10;
} }
// cloudCoeffs
// {
// type cloud;
// axis x;
//
// points
// (
// (-0.0205936225239282 0.0144729199524163 0.00001)
// );
// }
// triSurfaceMeshPointSetCoeffs
// {
// type triSurfaceMeshPointSet;
// axis distance;
// surface twoTri.stl;
// }
} }
} }

View File

@ -103,8 +103,8 @@ ManualInjectionCoeffs
{ {
minValue 5e-06; minValue 5e-06;
maxValue 0.0005; maxValue 0.0005;
d ( 5e-05 ); d 5e-05;
n ( 0.5 ); n 0.5;
} }
} }
} }

View File

@ -88,8 +88,8 @@ ManualInjectionCoeffs
{ {
minValue 5e-06; minValue 5e-06;
maxValue 0.000565; maxValue 0.000565;
d ( 4.8e-05 ); d 4.8e-05;
n ( 0.5 ); n 0.5;
} }
} }
} }

View File

@ -15,7 +15,7 @@ FoamFile
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
thermoType hPsiMixtureThermo<reactingMixture<gasThermoPhysics>>; thermoType hsPsiMixtureThermo<reactingMixture<gasThermoPhysics>>;
chemistryReader foamChemistryReader; chemistryReader foamChemistryReader;

View File

@ -75,8 +75,8 @@ ManualInjectionCoeffs
{ {
minValue 5e-05; minValue 5e-05;
maxValue 0.0001; maxValue 0.0001;
d ( 7.5e-05 ); d 7.5e-05;
n ( 0.5 ); n 0.5;
} }
} }
} }

View File

@ -88,8 +88,8 @@ ManualInjectionCoeffs
{ {
minValue 5e-06; minValue 5e-06;
maxValue 0.0005; maxValue 0.0005;
d ( 5e-05 ); d 5e-05;
n ( 0.5 ); n 0.5;
} }
} }
} }