diff --git a/src/fieldSources/Make/files b/src/fieldSources/Make/files new file mode 100644 index 0000000000..0df9defae4 --- /dev/null +++ b/src/fieldSources/Make/files @@ -0,0 +1,28 @@ +basicSource/basicSource/basicSource.C +basicSource/basicSource/basicSourceIO.C +basicSource/basicSource/basicSourceList.C +basicSource/basicSource/IObasicSourceList.C + +basicSource/pressureGradientExplicitSource/pressureGradientExplicitSource.C +basicSource/pressureGradientExplicitSource/pressureGradientExplicitSourceIO.C + +basicSource/explicitSource/explicitSource.C +basicSource/explicitSetValue/explicitSetValue.C + +basicSource/rotorDiskSource/rotorDiskSource.C +basicSource/rotorDiskSource/bladeModel/bladeModel.C +basicSource/rotorDiskSource/profileModel/profileModel.C +basicSource/rotorDiskSource/profileModel/profileModelList.C +basicSource/rotorDiskSource/profileModel/lookup/lookupProfile.C +basicSource/rotorDiskSource/profileModel/series/seriesProfile.C + +basicSource/actuationDiskSource/actuationDiskSource.C +basicSource/radialActuationDiskSource/radialActuationDiskSource.C + +interRegion = basicSource/interRegionHeatTransferModel +$(interRegion)/interRegionHeatTransferModel/interRegionHeatTransferModel.C +$(interRegion)/constantHeatTransfer/constantHeatTransfer.C +$(interRegion)/tabulatedHeatTransfer/tabulatedHeatTransfer.C +$(interRegion)/variableHeatTransfer/variableHeatTransfer.C + +LIB = $(FOAM_LIBBIN)/libfieldSources \ No newline at end of file diff --git a/src/fieldSources/Make/options b/src/fieldSources/Make/options new file mode 100644 index 0000000000..bb78896172 --- /dev/null +++ b/src/fieldSources/Make/options @@ -0,0 +1,17 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude \ + -I$(LIB_SRC)/turbulenceModels + + +LIB_LIBS = \ + -lfiniteVolume \ + -lsampling \ + -lmeshTools \ + -lbasicSolidThermo \ + -lcompressibleTurbulenceModel diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C b/src/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C similarity index 100% rename from src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C rename to src/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.C diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H b/src/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H similarity index 100% rename from src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H rename to src/fieldSources/basicSource/actuationDiskSource/actuationDiskSource.H diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSourceTemplates.C b/src/fieldSources/basicSource/actuationDiskSource/actuationDiskSourceTemplates.C similarity index 100% rename from src/finiteVolume/cfdTools/general/fieldSources/basicSource/actuationDiskSource/actuationDiskSourceTemplates.C rename to src/fieldSources/basicSource/actuationDiskSource/actuationDiskSourceTemplates.C diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C b/src/fieldSources/basicSource/basicSource/IObasicSourceList.C similarity index 100% rename from src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.C rename to src/fieldSources/basicSource/basicSource/IObasicSourceList.C diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.H b/src/fieldSources/basicSource/basicSource/IObasicSourceList.H similarity index 100% rename from src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/IObasicSourceList.H rename to src/fieldSources/basicSource/basicSource/IObasicSourceList.H diff --git a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C b/src/fieldSources/basicSource/basicSource/basicSource.C similarity index 78% rename from src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C rename to src/fieldSources/basicSource/basicSource/basicSource.C index da790fab4d..40f283a78a 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C +++ b/src/fieldSources/basicSource/basicSource/basicSource.C @@ -38,16 +38,17 @@ namespace Foam template<> const char* NamedEnum < basicSource::selectionModeType, - 4 + 5 >::names[] = { "points", "cellSet", "cellZone", + "mapRegion", "all" }; - const NamedEnum + const NamedEnum basicSource::selectionModeTypeNames_; } @@ -73,6 +74,13 @@ void Foam::basicSource::setSelection(const dictionary& dict) dict.lookup("cellZone") >> cellSetName_; break; } + case smMapRegion: + { + dict_.lookup("secondarySourceName") >> secondarySourceName_; + dict_.lookup("mapRegionName") >> mapRegionName_; + master_ = readBool(dict_.lookup("master")); + break; + } case smAll: { break; @@ -151,6 +159,47 @@ void Foam::basicSource::setCellSet() break; } + case smMapRegion: + { + if(active_) + { + Info<< indent << "- selecting inter region mapping" << endl; + const fvMesh& secondaryMesh = + mesh_.time().lookupObject(mapRegionName_); + const boundBox primaryBB = mesh_.bounds(); + const boundBox secondaryBB = secondaryMesh.bounds(); + if (secondaryBB.overlaps(primaryBB)) + { + + // Dummy patches + wordList cuttingPatches; + HashTable patchMap; + + secondaryToPrimaryInterpPtr_.reset + ( + new meshToMesh + ( + secondaryMesh, + mesh_, + patchMap, + cuttingPatches + ) + ); + } + else + { + FatalErrorIn + ( + "Foam::basicSource::setCellSet()" + ) << "regions dont overlap " + << secondaryMesh.name() + << " in region " << mesh_.name() + << nl + << exit(FatalError); + } + } + break; + } case smAll: { Info<< indent << "- selecting all cells" << endl; @@ -169,16 +218,19 @@ void Foam::basicSource::setCellSet() } // Set volume information - V_ = 0.0; - forAll(cells_, i) + if(selectionMode_ != smMapRegion) { - V_ += mesh_.V()[cells_[i]]; - } - reduce(V_, sumOp()); + V_ = 0.0; + forAll(cells_, i) + { + V_ += mesh_.V()[cells_[i]]; + } + reduce(V_, sumOp()); - Info<< indent << "- selected " - << returnReduce(cells_.size(), sumOp