diff --git a/applications/solvers/combustion/dieselEngineFoam/createFields.H b/applications/solvers/combustion/dieselEngineFoam/createFields.H index 9d9229cc3c..6987608006 100644 --- a/applications/solvers/combustion/dieselEngineFoam/createFields.H +++ b/applications/solvers/combustion/dieselEngineFoam/createFields.H @@ -13,6 +13,14 @@ PtrList& Y = composition.Y(); word inertSpecie(thermo.lookup("inertSpecie")); +if (!composition.contains(inertSpecie)) +{ + FatalErrorIn(args.executable()) + << "Specified inert specie '" << inertSpecie << "' not found in " + << "species list. Available species:" << composition.species() + << exit(FatalError); +} + volScalarField rho ( IOobject diff --git a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H index 5c84cfdb3f..abe03f60c0 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H @@ -14,7 +14,7 @@ tmp > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i::correctSurfaceValues return; } - // Far field gas molar fractions + // Far field carrier molar fractions scalarField Xinf(Y_.size()); forAll(Xinf, i) @@ -135,7 +135,7 @@ void Foam::ReactingParcel::correctSurfaceValues // Molar fraction of far field species at particle surface const scalar Xsff = 1.0 - min(sum(Cs)*specie::RR*this->T_/pc_, 1.0); - // Surface gas total molar concentration + // Surface carrier total molar concentration const scalar CsTot = pc_/(specie::RR*this->T_); // Surface carrier composition (molar fraction) @@ -171,10 +171,10 @@ void Foam::ReactingParcel::correctSurfaceValues cbrt(td.cloud().mcCarrierThermo().speciesData()[i].W()); rhos += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].W(); - cps += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].Cp(T); mus += Ys[i]*sqrtW*td.cloud().mcCarrierThermo().speciesData()[i].mu(T); kappa += Ys[i]*cbrtW*td.cloud().mcCarrierThermo().speciesData()[i].kappa(T); + cps += Xs[i]*td.cloud().mcCarrierThermo().speciesData()[i].Cp(T); sumYiSqrtW += Ys[i]*sqrtW; sumYiCbrtW += Ys[i]*cbrtW; @@ -417,7 +417,7 @@ void Foam::ReactingParcel::calcPhaseChange const scalarField& YComponents, scalarField& dMassPC, scalar& Sh, - scalar& dhsTrans, + scalar& dhsTrans, // TODO: not used scalar& N, scalar& NCpW, scalarField& Cs diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C index 7851841a74..a87342c6fe 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C @@ -233,7 +233,7 @@ Foam::scalar Foam::ThermoParcel::calcHeatTransfer if (mag(htc) < ROOTVSMALL && !td.cloud().radiation()) { - return T + dt*Sh/(this->volume(d)*rho*cp); + return max(T + dt*Sh/(this->volume(d)*rho*cp), td.constProps().TMin()); } const scalar As = this->areaS(d); @@ -256,9 +256,11 @@ Foam::scalar Foam::ThermoParcel::calcHeatTransfer IntegrationScheme::integrationResult Tres = td.cloud().TIntegrator().integrate(T, dt, ap, bp); - dhsTrans += dt*htc*As*(Tres.average() - Tc_); + scalar Tnew = max(Tres.value(), td.constProps().TMin()); - return Tres.value(); + dhsTrans += dt*htc*As*(0.5*(T + Tnew) - Tc_); + + return Tnew; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C index 44d8915497..7c62bfda6e 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/Rebound/Rebound.C @@ -71,15 +71,12 @@ bool Foam::Rebound::correct nw /= mag(nw); scalar Un = U & nw; - vector Ut = U - Un*nw; if (Un > 0.0) { U -= UFactor_*2.0*Un*nw; } - U -= Ut; - return true; } diff --git a/src/postProcessing/functionObjects/field/Make/files b/src/postProcessing/functionObjects/field/Make/files index e950e4d4d5..6195b98a41 100644 --- a/src/postProcessing/functionObjects/field/Make/files +++ b/src/postProcessing/functionObjects/field/Make/files @@ -7,10 +7,10 @@ fieldMinMax/fieldMinMax.C fieldMinMax/fieldMinMaxFunctionObject.C fieldValues/fieldValue/fieldValue.C -fieldValues/face/faceSource.C -fieldValues/face/faceSourceFunctionObject.C -fieldValues/cell/cellSource.C -fieldValues/cell/cellSourceFunctionObject.C +fieldValues/faceSource/faceSource.C +fieldValues/faceSource/faceSourceFunctionObject.C +fieldValues/cellSource/cellSource.C +fieldValues/cellSource/cellSourceFunctionObject.C streamLine/streamLine.C streamLine/streamLineParticle.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/IOcellSource.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/IOcellSource.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/IOcellSource.H rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/IOcellSource.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/cellSource.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/cellSource.C rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/cellSource.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/cellSource.H rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSource.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceFunctionObject.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.C similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceFunctionObject.C rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceFunctionObject.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceFunctionObject.H rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceFunctionObject.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceI.H b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceI.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceI.H rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceI.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/cell/cellSourceTemplates.C rename to src/postProcessing/functionObjects/field/fieldValues/cellSource/cellSourceTemplates.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/IOfaceSource.H b/src/postProcessing/functionObjects/field/fieldValues/faceSource/IOfaceSource.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/face/IOfaceSource.H rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/IOfaceSource.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C similarity index 82% rename from src/postProcessing/functionObjects/field/fieldValues/face/faceSource.C rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index 76c1ac9515..710e346ed5 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/face/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C @@ -50,10 +50,13 @@ namespace Foam fieldValues::faceSource::sourceTypeNames_; template<> - const char* NamedEnum:: - names[] = {"none", "sum", "areaAverage", "areaIntegrate"}; + const char* NamedEnum:: + names[] = + { + "none", "sum", "areaAverage", "areaIntegrate", "weightedAverage" + }; - const NamedEnum + const NamedEnum fieldValues::faceSource::operationTypeNames_; } @@ -68,7 +71,9 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces() if (zoneId < 0) { FatalErrorIn("faceSource::faceSource::setFaceZoneFaces()") - << "Unknown face zone name: " << sourceName_ + << type() << " " << name_ << ": " + << sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl + << " Unknown face zone name: " << sourceName_ << ". Valid face zones are: " << mesh().faceZones().names() << nl << exit(FatalError); } @@ -164,7 +169,9 @@ void Foam::fieldValues::faceSource::setPatchFaces() if (patchId < 0) { FatalErrorIn("faceSource::constructFaceAddressing()") - << "Unknown patch name: " << sourceName_ + << type() << " " << name_ << ": " + << sourceTypeNames_[source_] << "(" << sourceName_ << "):" << nl + << " Unknown patch name: " << sourceName_ << ". Valid patch names are: " << mesh().boundaryMesh().names() << nl << exit(FatalError); @@ -197,7 +204,7 @@ void Foam::fieldValues::faceSource::setPatchFaces() // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -void Foam::fieldValues::faceSource::initialise() +void Foam::fieldValues::faceSource::initialise(const dictionary& dict) { switch (source_) { @@ -214,15 +221,40 @@ void Foam::fieldValues::faceSource::initialise() default: { FatalErrorIn("faceSource::constructFaceAddressing()") - << "Unknown source type. Valid source types are:" + << type() << " " << name_ << ": " + << sourceTypeNames_[source_] << "(" << sourceName_ << "):" + << nl << " Unknown source type. Valid source types are:" << sourceTypeNames_ << nl << exit(FatalError); } } Info<< type() << " " << name_ << ":" << nl - << " total faces = " << faceId_.size() << nl - << " total area = " << sum(filterField(mesh().magSf())) - << nl << endl; + << " total faces = " << faceId_.size() << nl + << " total area = " << sum(filterField(mesh().magSf())) << nl; + + if (operation_ == opWeightedAverage) + { + dict.lookup("weightField") >> weightFieldName_; + if + ( + obr().foundObject(weightFieldName_) + || obr().foundObject(weightFieldName_) + ) + { + Info<< " weight field = " << weightFieldName_; + } + else + { + FatalErrorIn("faceSource::constructFaceAddressing()") + << type() << " " << name_ << ": " + << sourceTypeNames_[source_] << "(" << sourceName_ << "):" + << nl << " Weight field " << weightFieldName_ + << " must be either a " << volScalarField::typeName << " or " + << surfaceScalarField::typeName << nl << exit(FatalError); + } + } + + Info<< nl << endl; } @@ -302,12 +334,13 @@ Foam::fieldValues::faceSource::faceSource faceId_(), facePatchId_(), flipMap_(), - outputFilePtr_(NULL) + outputFilePtr_(NULL), + weightFieldName_("undefinedWeightedFieldName") { - initialise(); - if (active_) { + initialise(dict); + // Create the output file if not already created makeFile(); } @@ -327,7 +360,7 @@ void Foam::fieldValues::faceSource::read(const dictionary& dict) if (active_) { fieldValue::read(dict); - initialise(); + initialise(dict); } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/faceSource.H b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H similarity index 93% rename from src/postProcessing/functionObjects/field/fieldValues/face/faceSource.H rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H index fa89fcdd6c..3509d733cd 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/face/faceSource.H +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.H @@ -39,7 +39,7 @@ Description valueOutput true; // Write values at run-time output times? source faceZone; // Type of face source: faceZone, patch sourceName f0; - operation sum; // none, sum, areaAverage, areaIntegrate + operation sum; fields ( p @@ -48,6 +48,13 @@ Description ); } + where operation is one of: + - none + - sum + - areaAverage + - areaIntegrate + - weightedAverage + SourceFiles faceSource.C @@ -100,11 +107,12 @@ public: opNone, opSum, opAreaAverage, - opAreaIntegrate + opAreaIntegrate, + opWeightedAverage }; //- Operation type names - static const NamedEnum operationTypeNames_; + static const NamedEnum operationTypeNames_; private: @@ -143,11 +151,14 @@ protected: //- Output file pointer autoPtr outputFilePtr_; + //- Weight field name - only used for opWeightedAverage mode + word weightFieldName_; + // Protected member functions //- Initialise, e.g. face addressing - void initialise(); + void initialise(const dictionary& dict); //- Insert field values into values list template diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/faceSourceFunctionObject.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.C similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/face/faceSourceFunctionObject.C rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.C diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/faceSourceFunctionObject.H b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/face/faceSourceFunctionObject.H rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceFunctionObject.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/faceSourceI.H b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceI.H similarity index 100% rename from src/postProcessing/functionObjects/field/fieldValues/face/faceSourceI.H rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceI.H diff --git a/src/postProcessing/functionObjects/field/fieldValues/face/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C similarity index 82% rename from src/postProcessing/functionObjects/field/fieldValues/face/faceSourceTemplates.C rename to src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index ced2ee82ee..d7609573a7 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/face/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -129,6 +129,47 @@ Type Foam::fieldValues::faceSource::processValues result = sum(values*filterField(mesh().magSf())); break; } + case opWeightedAverage: + { + if (mesh().foundObject(weightFieldName_)) + { + tmp wField = + filterField + ( + mesh().lookupObject(weightFieldName_) + ); + result = sum(values*wField())/sum(wField()); + } + else if (mesh().foundObject(weightFieldName_)) + { + tmp wField = + filterField + ( + mesh().lookupObject + ( + weightFieldName_ + ) + ); + result = sum(values*wField())/sum(wField()); + } + else + { + FatalErrorIn + ( + "fieldValues::faceSource::processValues" + "(" + "List&" + ") const" + ) << type() << " " << name_ << ": " + << sourceTypeNames_[source_] << "(" << sourceName_ << "):" + << nl + << " Weight field " << weightFieldName_ + << " must be either a " << volScalarField::typeName + << " or " << surfaceScalarField::typeName << nl + << abort(FatalError); + } + break; + } default: { // Do nothing diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H index cdedaae131..3d862b1f6b 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H @@ -137,7 +137,7 @@ public: //- Return the output field values flag const Switch& valueOutput() const; - //- Helper funvction to return the reference to the mesh + //- Helper function to return the reference to the mesh const fvMesh& mesh() const; diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index f575e970b4..21e2171ec0 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -63,10 +63,7 @@ inline Foam::hPolynomialThermo::hPolynomialThermo cpPolynomial_(pt.cpPolynomial_), dhPolynomial_(pt.dhPolynomial_), dsPolynomial_(pt.dsPolynomial_) -{ - // Offset dh poly so that it is relative to the enthalpy at Tstd - dhPolynomial_[0] -= dhPolynomial_.evaluate(specie::Tstd); -} +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H index 217604e133..5d68ecf671 100644 --- a/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H +++ b/src/thermophysicalModels/specie/thermo/janaf/janafThermoI.H @@ -56,7 +56,7 @@ inline Foam::janafThermo::janafThermo template inline void Foam::janafThermo::checkT(const scalar T) const { - if (T < Tlow_ || T > Thigh_) + if (T < Tlow_ || T > Thigh_) { FatalErrorIn ( diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U new file mode 100644 index 0000000000..2eee81b3a0 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/U @@ -0,0 +1,42 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + stationaryWalls + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + floatingObject + { + type movingWallVelocity; + value uniform (0 0 0); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/alpha1 b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/alpha1 new file mode 100644 index 0000000000..8b3768458d --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/alpha1 @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alpha1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + stationaryWalls + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + floatingObject + { + type zeroGradient; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/epsilon b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/epsilon new file mode 100644 index 0000000000..849d3713a5 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/epsilon @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -3 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + stationaryWalls + { + type epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0.1; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + floatingObject + { + type epsilonWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/k b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/k new file mode 100644 index 0000000000..84563be30c --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/k @@ -0,0 +1,43 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + stationaryWalls + { + type kqRWallFunction; + value uniform 0.1; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0.1; + value uniform 0.1; + } + floatingObject + { + type kqRWallFunction; + value uniform 0.1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/nut b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/nut new file mode 100644 index 0000000000..a86c3e35e0 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/nut @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + stationaryWalls + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } + atmosphere + { + type calculated; + value uniform 0; + } + floatingObject + { + type nutkWallFunction; + Cmu 0.09; + kappa 0.41; + E 9.8; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/p b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/p new file mode 100644 index 0000000000..b512720556 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/p @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object pd; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + stationaryWalls + { + type buoyantPressure; + value uniform 0; + } + atmosphere + { + type totalPressure; + p0 uniform 0; + U U; + phi phi; + rho rho; + psi none; + gamma 1; + value uniform 0; + } + floatingObject + { + type buoyantPressure; + value uniform 0; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/pointDisplacement b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/pointDisplacement new file mode 100644 index 0000000000..711e09e22d --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/0.org/pointDisplacement @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class pointVectorField; + location "0.01"; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + stationaryWalls + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fixedValue; + value uniform (0 0 0); + } + floatingObject + { + type sixDoFRigidBodyDisplacement; + centreOfMass (0.5 0.5 0.5); + momentOfInertia (0.08622222 0.8622222 0.144); + mass 9.6; + rhoInf 1; + Q (1 0 0 0 1 0 0 0 1); + v (0 0 0); + a (0 0 0); + pi (0 0 0); + tau (0 0 0); + value uniform (0 0 0); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun index 1bece85bd9..7c7ab52940 100755 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun @@ -20,7 +20,7 @@ makeMeshByCellSet() runApplication blockMesh makeMeshByCellSet 1 2 runApplication subsetMesh -overwrite c0 -patch floatingObject -cp -r 0.orig 0 > /dev/null 2>&1 +cp -r 0.org 0 > /dev/null 2>&1 runApplication setFields runApplication $application