diff --git a/.gitignore b/.gitignore index a964dd7570..43c7337ec1 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ core lnInclude # build folders - anywhere +linux*Clang*/ linux*Gcc*/ linux*Icc*/ linuxming*/ diff --git a/Allwmake b/Allwmake index 36d7658f19..035b24811b 100755 --- a/Allwmake +++ b/Allwmake @@ -12,7 +12,12 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || { ( cd wmake/src && make ) # build ThirdParty sources -$WM_THIRD_PARTY_DIR/Allwmake +if [ -d "$WM_THIRD_PARTY_DIR" ] +then + $WM_THIRD_PARTY_DIR/Allwmake +else + echo "no ThirdParty sources found - skipping" +fi # build OpenFOAM libraries and applications src/Allwmake diff --git a/README b/README deleted file mode 100644 index d2a992048c..0000000000 --- a/README +++ /dev/null @@ -1,209 +0,0 @@ -# -*- mode: org; -*- -# -#+TITLE: OpenFOAM README for version 1.6 -#+AUTHOR: OpenCFD Ltd. -#+DATE: April 2010 -#+LINK: http://www.opencfd.co.uk -#+OPTIONS: author:nil ^:{} - -* Copyright - OpenFOAM is free software: you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation, either version 3 of the License, or (at your option) any later - version. See the file COPYING in this directory, for a description of the - GNU General Public License terms under which you can copy the files. - -* System requirements - OpenFOAM is developed and tested on Linux, but should work with other POSIX - systems. To check your system setup, execute the foamSystemCheck script in - the bin/ directory of the OpenFOAM installation. If no problems are reported, - proceed to "3. Installation"; otherwise contact your system administrator. - - If the user wishes to run OpenFOAM in 32/64-bit mode they should consult the - section "Running OpenFOAM in 32-bit mode". - -*** Qt (from http://trolltech.com/products/qt) - The ParaView 3.7.0 visualisation package requires Qt to be installed on the - system. ParaView's producers state that ParaView is only officially - supported on Qt version 4.6.x. However, we have found in limited tests that - ParaView works satisfactorily with Qt than 4.5.x. To - check whether Qt4 is installed, and the version, type: - + qmake --version - - Both 32-bit and 64-bit version of ParaView were compiled with Qt-4.4.3 (with - openSUSE-11.1). If the user finds that a ParaView binary fails to run, then - it is almost certainly due to a conflict in compiled and installed Qt - versions and they will need to consult the section below on "Compiling - ParaView and the PV3FoamReader module." - - The default versions of Qt used by some GNU/Linux releases are as follows. - + ubuntu-7.10: Version 4.3.2 - + ubuntu-8.04: Version 4.3.4 - + ubuntu-9.04: Version 4.5.0 - + openSUSE-10.2: Version 4.2.1 - too old - + openSUSE-10.3: Version 4.3.1 - + openSUSE-11.0: Version 4.4.0 - + openSUSE-11.1: Version 4.4.3 - + openSUSE-11.2: Version 4.5.3 - - Compilation and running of ParaView has been successful using the libraries - downloaded in the "libqt4-dev" package on ubuntu. - - If you don't have an appropriate version of Qt installed you can download - the sources e.g.: - http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.2.tar.gz - and compile and install in /usr/local or some other location that does not - conflict with the pre-installed version. - -* Installation - Download and unpack the files in the $HOME/OpenFOAM directory as described in: - http://www.OpenFOAM.org/download.html - - The environment variable settings are contained in files in an etc/ directory - in the OpenFOAM release. e.g. in - - + $HOME/OpenFOAM/OpenFOAM-1.6/etc/ - - 1) EITHER, if running bash or ksh (if in doubt type 'echo $SHELL'), source the - etc/bashrc file by adding the following line to the end of your - $HOME/.bashrc file: - - + . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc - - Then update the environment variables by sourcing the $HOME/.bashrc file by - typing in the terminal: - - + . $HOME/.bashrc - - 2) OR, if running tcsh or csh, source the etc/cshrc file by adding the - following line to the end of your $HOME/.cshrc file: - - + source $HOME/OpenFOAM/OpenFOAM-1.6/etc/cshrc - - Then update the environment variables by sourcing the $HOME/.cshrc file by - typing in the terminal: - - + source $HOME/.cshrc - -*** Installation in alternative locations - OpenFOAM may also be installed in alternative locations. However, the - installation directory should be network available (e.g., NFS) if parallel - calculations are planned. - - The environment variable 'FOAM_INST_DIR' can be used to find and source the - appropriate resource file. Here is a bash/ksh/sh example: - - + export FOAM_INST_DIR=/data/app/OpenFOAM - + foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/bashrc - + [ -f $foamDotFile ] && . $foamDotFile - - and a csh/tcsh example: - - + setenv FOAM_INST_DIR /data/app/OpenFOAM - + foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/cshrc - + if ( -f $foamDotFile ) source $foamDotFile - - The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts - of the OpenFOAM installation. - -* Building from Sources (Optional) - If you cannot find an appropriate binary pack for your platform, you can build - the complete OpenFOAM from the source-pack. You will first need to compile or - obtain a recent version of gcc (we recommend gcc-4.4.?) for your platform, - which may be obtained from http://gcc.gnu.org/. - - Install the compiler in - $WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/gcc- - and change the gcc version number in $WM_PROJECT_DIR/etc/settings.sh and - $WM_PROJECT_DIR/etc/settings.csh appropriately and finally update the - environment variables as in section 3. - - Now go to the top-level source directory $WM_PROJECT_DIR and execute the - top-level build script './Allwmake'. In principle this will build everything, - but if problems occur with the build order it may be necessary to update the - environment variables and re-execute './Allwmake'. - - If you experience difficulties with building the source-pack, or your platform - is not currently supported, please contact to - negotiate a support contract and we will do the port and maintain it for - future releases. - -* Testing the installation - To check your installation setup, execute the 'foamInstallationTest' script - (in the bin/ directory of the OpenFOAM installation). If no problems are - reported, proceed to getting started with OpenFOAM; otherwise, go back and - check you have installed the software correctly and/or contact your system - administrator. - -* Getting Started - Create a project directory within the $HOME/OpenFOAM directory named - -1.6 (e.g. 'chris-1.6' for user chris and OpenFOAM version 1.6) - and create a directory named 'run' within it, e.g. by typing: - - + mkdir -p $FOAM_RUN/run - - Copy the 'tutorial' examples directory in the OpenFOAM distribution to the - 'run' directory. If the OpenFOAM environment variables are set correctly, - then the following command will be correct: - - + cp -r $WM_PROJECT_DIR/tutorials $FOAM_RUN - - Run the first example case of incompressible laminar flow in a cavity: - - + cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity - + blockMesh - + icoFoam - + paraFoam - - Refer to the OpenFOAM User Guide at http://www.OpenFOAM.org/doc/user.html for - more information. - -* Compiling Paraview 3.7.0 and the PV3FoamReader module - If there are problems encountered with ParaView, then it may be necessary to - compile ParaView from sources. The compilation - is a fairly simple process using the makeParaView script - (found in ThirdParty directory), which has worked in our tests with other - packages supplied in the ThirdParty directory, namely cmake-2.8.0 and - gcc-4.4.3. Execute the following: - + cd $WM_THIRD_PARTY_DIR - + rm -rf paraview-3.7.0/platforms - + rm -rf platforms/*/paraview-3.7.0 - + ./makeParaView - - The PV3blockMeshReader and the PV3FoamReader ParaView plugins are compiled - as usual for OpenFOAM utilities: - + cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers/ - + ./Allwclean - + ./Allwmake - -*** Compiling Paraview with a local version of Qt - If the user still encounters problems with ParaView, it may relate to the - version of Qt, in which case, it is recommended that the user first - downloads a supported version of Qt /e.g./ 4.5.3 as described in the section - on "Qt". The user should unpack the source pack in the $WM_THIRD_PARTY_DIR. - Then the user can build Qt by executing from within $WM_THIRD_PARTY_DIR: - + ./makeQt - - The user should then compile ParaView using the local version of Qt by - executing makeParaView with the -qmake option, giving the full path of the - newly built qmake as an argument: - + ./makeParaView -qmake - - The user must then recompile the PV3blockMeshReader and the - PV3FoamReader plugins as usual (see above). - -* Documentation - http://www.OpenFOAM.org/doc - -* Help - http://www.OpenFOAM.org http://www.OpenFOAM.org/discussion.html - -* Reporting Bugs in OpenFOAM - http://www.OpenFOAM.org/bugs.html - -* Running OpenFOAM in 32-bit mode on 64-bit machines - Linux users with a 64-bit machine may install either the OpenFOAM 32-bit - version (linux) or the OpenFOAM 64-bit version (linux64), or both. The 64-bit - is the default mode on a 64-bit machine. To use an installed 32-bit version, - the user must set the environment variable WM_ARCH_OPTION to 32 before - sourcing the etc/bashrc (or etc/cshrc) file. diff --git a/ReleaseNotes-1.6 b/ReleaseNotes-1.6 deleted file mode 100644 index 545021a6b3..0000000000 --- a/ReleaseNotes-1.6 +++ /dev/null @@ -1,374 +0,0 @@ -# -*- mode: org; -*- -# -#+TITLE: OpenFOAM release notes for version 1.6 -#+AUTHOR: OpenCFD Ltd. -#+DATE: July 2009 -#+LINK: http://www.opencfd.co.uk -#+OPTIONS: author:nil ^:{} - -* Overview - OpenFOAM-1.6 is a significant upgrade to version 1.5 in ways that are - outlined below. This release passes all our standard tests and the - tutorials have been broadly checked. If there are any bugs, please report - them using the instructions set out here: - http://www.OpenFOAM.org/bugs.html. - -* GNU/Linux version - The 32bit and 64bit binary packs of the OpenFOAM release were compiled on - a machine running openSUSE GNU/Linux version 11.1 and also tested on - Ubuntu 9. We recommend that users run OpenFOAM on one of these, or on a - similarly recent version of GNU/Linux. This release has also been - successfully compiled and tested on older GNU/Linux releases, but this - requires the installation of Qt 4.3.? (the sources for which are supplied - with OpenFOAM-1.6, see README) for ParaView-3 to run. - -* C++ Compiler version - + Release compiled with GCC 4.3.3. - + Built-in support for the Intel C++ 10.? compiler (untested). - + The choice of the compiler is controlled by the setting of the - ~$WM_COMPILER~ and ~$WM_COMPILER_ARCH~ environment variables in the - /OpenFOAM-1.6/etc/bashrc/ (or /cshrc/) file. - + The location of the compiler installation is controlled by the - ~$compilerInstall~ environment variable in the - /OpenFOAM-1.6/etc/settings.sh/ (or /settings.csh/) file. - -* Library developments - -*** Core library - -***** Dictionary improvements/changes - + Dictionaries can use words (unquoted) or regular expressions (quoted) - for their keywords. When searching, an exact match has priority over a - regular expression match. Multiple regular expressions are matched in - reverse order. - + The *new* =#includeIfPresent= directive is similar to the =#include= - directive, but does not generate an error if the file does not exist. - + The default =#inputMode= is now '=merge=', which corresponds to the most - general usage. The =#inputMode warn= corresponds to the previous default - behaviour. - + The *new* =#inputMode protect= can be used to conditionally merge - default values into existing dictionaries. - + *New* =digest()= method to calculate and return the SHA1 message digest. - -***** Regular Expressions - The addition of regular expressions marks a major improvement in - usability. - + *New* =regExp= class provides support for accessing POSIX extended - regular expresssions from within OpenFOAM. - + *New* =wordRe= class can contain a =word= or a =regExp= . - + *New* =stringListOps= to search string lists based on regular - expressions, =wordRe= or =wordReList=. - + =Istream= and =Ostream= now retain backslashes when reading/writing - strings. - -***** Convenience changes - + =IOobject= has a *new* constructor for creating an =IOobject= from a - single-path specification (eg, see =blockMesh -dict= option). - + =argList= has *new* convenience methods for accessing options more - directly: =option()=, =optionFound()=, =optionLookup()=, =optionRead()=, - =optionReadIfPresent()=. - + The *new* =readList(Istream&)= can read a bracket-delimited list or - handle a single value as a list of size 1. This can be a useful - convenience when processing command-line options. - + Export *new* environment variable =FOAM_CASENAME= that contains the - name part of the =FOAM_CASE= environment variable. - -*** Turbulence modelling - + Major development of turbulence model libraries to give extra flexibility - at the solver level. For solvers that can support either RAS/LES - computations, the selection is made in the - /constant/turbulenceProperties/, by setting the =simulationType= keyword - to: - - =laminar=, - - =RASModel=, - - =LESModel=. - + Depending on the selection, the model is the instantiated from /constant// - - /RASProperties/, - - /LESProperties/. - -***** RAS wall functions - Wall functions are now run-time selectable per patch for RAS. - + Velocity: - - Apply to turbulent viscosities =nut= or =mut=, - - Apply to =k=, =Q=, =R=, - - Apply to =epsilon=, =omega=. - + Temperature: - - Apply to turbulent thermal diffusivity, =alphat= (compressible only). - + To apply wall functions: - - To recapture the functionality of previous OpenFOAM versions (v1.5 and - earlier) assign: - - for velocity: - - =nut=: =nutWallFunction=, - - =mut=: =muWallFunction=, - - =epsilon=: =epsilonWallFunction=, - - =omega=: =omegaWallFunction=, - - =k=, =q=, =R=: =kqRWallFunction=. - - for temperature: - - =alphat=: =alphatWallFunction=. - - New =alphaSgsJayatillekeWallFunction= thermal wall function for - compressible LES. - -***** *New* LES turbulence models - + Spalart-Allmaras DDES. - + Spalart-Allmaras IDDES. - -***** Upgrading: - + *New* utility - =applyWallFunctionBoundaryConditions=. - + Solvers will automatically update existing cases. - - New fields created based on the presence of the =nut/mut= field. - - Boundary conditions include scoping, i.e compressibility:: for - compressible solvers. - - Modified fields will be backed-up to /.old/. - + NOTE: - - Fields are only updated for those fields associated with the current - turbulence model selection, i.e. if fields exist for use with other - models, they will not be updated. - - The new specification is not backwards compatible. - -*** Thermo-physical Models - + Old compressibility-based thermo package renamed - =basicThermo= \rightarrow =basicPsiThermo=. - + *New* =basicRhoThermo= thermo package. - - Additional density field stored. - - General form - can be used for other types of media, e.g. liquids. - - Additional polynomial-based thermodynamics: - - Equation of state: =icoPolynomial=, - - Transport: =polynomialTransport=, - - Thermo: =hPolynomialThermo=. - + Removed earlier hard-coding of gas thermophysics for chemistry modelling: - - =reactingMixture= now templated on thermo package, - - =chemistryModel= now templated on thermo package, - - =chemistrySolver= now templated on thermo package. - + *New* =fvDOM= radition model - - finite volume, discrete ordinates method. - + *New* (reinstated) =eThermo= thermodynamics package - - internal energy-based thermodynamics. - -*** Lagrangian - -***** Intermediate - + Overhaul of the underlying framework. - + Reacting now split into reacting and reacting multiphase. - + New structure for variable composition. - + Many new sub-models, including: - - Injection - - =PatchInjection= - injection local to patch face cells, - - =FieldActivatedInjection= - injection based on satisfying external - criterion, - - LookupTableInjection - explicity define injection locations and all - parcel properties. - - Post-processing - - patch post-processing - collect data for parcels impacting user, - defined patches. - - Patch interaction - - generalised behaviour for parcel interaction with patch. - - Phase change - - liquid evaporation. - -***** Coal combustion - + *New* library - extension of reacting-multiphase functionality. - - Surface reaction/combustion models. - -*** Discrete methods - + *New* library offering DSMC simulation functionality - see =dsmcFoam= - below. - + Significant development of the libraries offering molecular dynamics - simulation functionality - see =mdFoam= and =mdEquilibrationFoam= below. - -*** Numerics - + *new* polynomial-fit higher-order interpolation schemes: - - =biLinearFit= - - =linearFit= - - =quadraticLinearFit= - - =quadraticFit= - - =linearPureUpwindFit= - - =quadraticLinearPureUpwindFit= - - =quadraticLinearUpwindFit= - - =quadraticUpwindFit= - - =cubicUpwindFit= - + *new* polynomial-fit higher-order Sn-Grad: =quadraticFitSnGrad=. - -*** *New* surfMesh library - Provides a more efficient storage mechanism than possible with =triSurface= - without restrictions on the shape of the face (templated parameter). - + =MeshedSurface= class - with zero or more contiguous =surfZones= . - + =UnsortedMeshedSurface= class - unordered surface zones (as per - =triSurface=). - + =surfMesh= class - for reading/writing in native OpenFOAM format. - -* Solvers -*** Solver restructuring - The upgrade to the turbulence models means that the simulation type, i.e. - laminar, RAS or LES can be selected at run time. This has allowed a reduction - in the number of solvers, simplifying the overall code structure - + Solvers which support laminar, RAS and LES: - - =turbFoam=, =oodles= \rightarrow =pisoFoam=. - - =turbDyMFoam= \rightarrow =pimpleDyMFoam=. - - =rhoTurbFoam=, =coodles= \rightarrow =rhoPisoFoam=. - - =xoodles= \rightarrow absorbed into =XiFoam=. - - =buoyantFoam=, =lesBuoyantFoam= \rightarrow =buoyantPisoFoam=. - - =interFoam=, =rasInterFoam=, =lesInterFoam= \rightarrow =interFoam=. - - =lesCavitatingFoam=, =rasCavitatingFoam= \rightarrow =cavitatingFoam=. - + Solvers which support LES only: - - =channelOodles= \rightarrow =channelFoam= (LES). - + =pd= replaced by static pressure =p=. All solvers in which buoyancy affects - might be strong have been converted from using =pd= to =p= with improved - numerics to give equally good accuracy and stability. This change is - prompted by the need to remove the confusion surrounding the meaning and - purpose of =pd=. - + =g= (acceleration due to gravity) is now a *new* - =uniformDimensionedVectorField= which has the behaviour of a field, is - registered to an =objectRegistry=, but stores only a single value. Thus - =g= and other =UniformDimensionedFields= can be created and looked-up - elsewhere in the code, /e.g./ in =fvPatchFields=. - -*** Solver control improvements - Now uses consistent dictionary entries for the solver controls. - + This Allows dictionary substitutions and regular expressions in - /system/fvSolution/. - + The old solver control syntax is still supported (warning emitted), but - the *new* =foamUpgradeFvSolution= utility can be used to convert - /system/fvSolution/ to the new format. - -*** *New* Solvers - + =buoyantBoussinesqSimpleFoam= Steady state heat transfer solver using a - Boussinesq approximation for buoyancy, with laminar, RAS or LES turbulence - modelling. - + =buoyantBoussinesqPisoFoam= Transient heat transfer solver using a - Boussinesq approximation for buoyancy, with laminar, RAS or LES turbulence - modelling. - + =coalChemistryFoam= Transient, reacting lagrangian solver, employing a coal - cloud and a thermo cloud, with chemistry, and laminar, RAS or LES turbulence - modelling. - + =porousExplicitSourceReactingParcelFoam= Transient, reacting lagrangian - solver, employing a single phase reacting cloud, with porous media, explicit - mass sources, and laminar, RAS or LES turbulence modelling. - + =rhoReactingFoam= Density-based thermodynamics variant of the reactingFoam - solver, i.e. now applicable to liquid systems. - + =dsmcFoam= DSMC (Direct Simulation Monte-Carlo) solver for rarefied gas - dynamics simulations, able to simulate mixtures of an arbitrary number of - gas species. The variable hard sphere collision model with Larsen-Borgnakke - internal energy redistribution (see "Molecular Gas Dynamics and the Direct - Simulation of Gas Flows" G.A. Bird, 1994) is available; other run-time - selectable collision models can be easily added. - -*** Updated solvers - + =mdFoam= Molecular Dynamics (MD) solver able to simulate a mixture of an - arbitrary number of mono-atomic and small, rigid polyatomic (i.e. H2O, N2) - molecular species, with 6 degree of freedom motion, in complex geometries. A - molecule of any species can be built by specifying its sites of mass and - charge. All molecules interact with short-range dispersion forces and - pairwise electrostatic interactions using methods described in: Fennell and - Gezelter, J. Chem. Phys. 124, 234104 (2006). - + =mdEquilibrationFoam= Similar to mdFoam, but employs velocity scaling to - adjust the simulation temperature to a target value. Useful to equilibrate a - case before simulation. - + =chtMultiRegionFoam= New boundary condition allows independent decomposition - of coupled regions without any constraint on the decomposition. - -* Boundary conditions - + Improved set of direct mapped boundary conditions. - + =buoyantPressureFvPatchScalarField=, the *new* buoyancy pressure boundary - condition now supports =p= and =pd= for backward compatibility. - + =uniformDensityHydrostaticPressure= is an additional pressure boundary - condition to aid the transition from =pd= to =p= as it behaves similarly to - specifying a uniform =pd= at an outlet for example. - + =activeBaffleVelocity= dynamically combines cyclic and wall patches so that - the flow through the patch can be controlled /e.g./ by pressure drop. - + =rotatingWallVelocity= specifies a rotating velocity, given the rotational - speed, origin and axis. - -* Utilities - -*** Improvements - + =blockMesh= has a *new* =-dict= option for specifying an alternative - dictionary for the block mesh description. The '=convertToMeters=' entry - is now optional, and the alternative '=scale=' entry can be used for - less typing. - + =foamToEnsight= has a *new* =-noPatches= option to suppress generation - of patches. - + =foamToEnsightParts= has *new* =-noMesh= and =-index= options that can - be useful when post-processing results incrementally. - + =snappyHexMesh= has lower memory footprint. New distributed triangulated - surface type for meshing surfaces with extremely large triangle count. - Now supports multi-region meshing of arbitrarily complex regions. - -*** *New* utilities - + =particleTracks= - generate particle tracks for lagrangian calculations. - + =dsmcInitialise= - preprocessing utility to create initial configurations - of DSMC particles in a geometry. - + =surfaceRedistributePar= - preprocessing utility to create distributed - triangulated surface. - -*** *New* foamCalc functions - + =interpolate= performs fvc::interpolate(). - + =randomise= randomises a by a given perturbation. - + =addSubtract= provides simple add/subtract field functionality. - -*** Usage - + =timeSelector= can now combine =-time ranges= and =-latestTime= options. - For example, -time '0.01:0.09' -latestTime vs. -time '0.01:'. - More reliable behaviour for cases missing /constant// or /0// directories. - When the =-noZero= option is enabled, =-latestTime= will not select the - =0/= directory unless the =-zeroTime= option is given. - This helps avoid ill effects caused by accidentally using the - /0// directory in certain utilities (eg, =reconstructPar=). - + =-region= option added to more utilities. - -*** Improvements to Paraview reader module - + =PV3FoamReader= added mesh region handling. The region name is parsed - from the filename. Eg, /case{region}.OpenFOAM/. - + =paraFoam= with a *new* =-region= option for specifying an alternative - region. A *new* =-touch= option to generate the /.OpenFOAM/ file only. - Only creates (and removes) /.OpenFOAM/ files if they didn't already - exist, which is useful in connection with the =-touch= option. - -* Post-processing - + Sampling on iso-surfaces, interpolated or non-interpolated. - + Sampling on surface defined by distance to surface (=distanceSurface=). - + Cutting planes for arbitrary meshes. - + Output to any surface geometry format supported by the =surfMesh= library. - -*** Function objects - -***** Improvements for function objects and time-looping - + The =functionObjectList= retains the order of the =functionObject= - order, which allows a chaining of operations. It is thus internally more - efficient when /system/controlDict/ uses =functions {..}= instead of - =functions (..)=, but both forms are supported. - + The =functionObject= now has an additional =end()= method that is called - when =Time::loop()= or =Time::run()= determine that the time-loop exits. - Accordingly, one of these two idioms should be used in solver code: - 1. =while (runTime.loop() { ... }=, - 2. =while (runTime.run()) { runTime++; ... }=. - + *New* =functionObjectList= now tracks the SHA1 message digest of the - sub-directories. This avoids reloading a =functionObject= when - something unrelated in /system/controlDict/ changed. - -***** *New* function objects: - + =systemCall= - executes a list of system instructions. - + =fieldMinMax= - computes the min/max of a . - + =staticPressure= - converts kinematic pressure to static pressure. - + =dsmcFields= - calculates intensive fields (velocity and temperature) - from averaged extensive fields (i.e. momentum and energy). - -***** Usage - + Improved output control: =timeStep= or =outputTime=. - -* Tutorial restructuring - to reflect solver application structure. - -* Third-party Software - + =gcc= upgraded to version 4.3.3. - + =OpenMPI= upgraded to version 1.3.3. - + =ParaView= upgraded to version 3.6.1. - + =Scotch= *new* decomposition method: \\ - Scotch (http://gforge.inria.fr/projects/scotch/) is a general multi-level - decomposition method originating from the ScAlApplix project (Inria). It is - a framework for general recursive partitioning methods and a such comparable - to Metis but with a permissive licence. - - The corresponding decomposition method (in =decomposeParDict=) is - =scotch=. An optional =strategy= string can be supplied to change the - decomposition methods; initial testing shows the default strategy producing - decompositions comparable in quality to Metis. diff --git a/ReleaseNotes-dev b/ReleaseNotes-dev new file mode 100644 index 0000000000..7231b2b1d1 --- /dev/null +++ b/ReleaseNotes-dev @@ -0,0 +1,184 @@ +# -*- mode: org; -*- +# +#+TITLE: OpenFOAM release notes for version dev +#+AUTHOR: OpenCFD Ltd. +#+DATE: TBA +#+LINK: http://www.openfoam.com +#+OPTIONS: author:nil ^:{} +# Copyright (c) 2010 OpenCFD Ltd. + +* Overview + OpenFOAM-dev is the latest major release of OpenFOAM including many new + developments a number of bug-fixes. This release passes our standard tests + and the tutorials have been broadly checked. Please report any bugs by + following the link: http://www.openfoam.com/bugs. + +* GNU/Linux version + This release of OpenFOAM is distributed primarily in 2 ways: (1) as a Debian + pack containing binaries and source; (2) from the SourceForge source code + repository (see [[./README.org][README]]). + + The Ubuntu/Debian pack is available for 32 and 64 bit versions of the 10.04 + LTS operating system using the system compiler and libraries that will be + installed automatically from standard Debian packs. + + To use the source version from the SourceForge repository, we provide a source + pack of third-party packages that can be compiled on the user's system. This + does not include =gcc=, since the system installed version is typically + sufficient, but includes =paraview-3.8.0=, =openmpi-1.4.1=, =scotch_5.1=, + =metis-5.0pre2=, =ParMetis-3.1= and =ParMGridGen-1.0=. + +* Library developments + + There have been a number of developments to the libraries to support the + extension of functionality in solver and utility applications. +*** Core library + + Large number of code refinements and consistency improvements to support + other developments. +*** Turbulence modelling +*** *Updated* thermophysical libraries + + Now use the more descriptive dictionary input format, e.g. for a single + component mixture: + + thermoType hPsiThermo>>>>; + + mixture + { + nMoles 1; + molWeight 28.9; + Cp 1007; + Hf 0; + As 1.4792e-06; + Ts 116; + } +*** Lagrangian intermediate library + Extensively updated + *Updated* input format + Extended to include steady cloud tracking + *New* collision modelling + *Coupled* to new surface film modelling library + *New* sub-models + + NonSphereDrag: drag model to account for non-spherical particles + + ParticleTracks: post-processing model to generate track data, typically + during steady calculations + *Updated* sub-models + + Devolatilisation models: now act on a per-specie basis + +*** DSMC +*** Dynamic Mesh +*** Numerics +*** *Updated* command line help, e.g. `snappyHexMesh -help' now gives: + + Usage: snappyHexMesh [OPTIONS] + options: + -case specify alternate case directory, default is the cwd + -overwrite overwrite existing mesh/results files + -parallel run in parallel + -srcDoc display source code in browser + -doc display application documentation in browser + -help print the usage + +*** *New* basicSolidThermo solids thermophysical library + + Used in all conjugate heat transfer solvers + + constant properties + + temperature dependent properties + + temperature and direction (in local coordinate system) dependent properties +*** *New* Surface film library + + Creation of films by particle addition, or initial film distribution + + Coupled with the lagrangian/intermediate cloud hierarchy library + + Hierarchical design, consisting of + + kinematic film: mass, momentum + + constant thermodynamic properties + + thermodynamic film: mass, momentum and enthalpy + + constant, or temperature dependant thermodynamic properties + + Sub-models: + + detachment/dripping whereby particles (re)enter the originating cloud + + particle sizes set according to PDF + + other properties set to ensure mass, momentum and energy conservation + + heat transfer to/from walls and film surface + + film evaporation and boiling + + Additional wall functions for primary region momentum and temperature + taking film into account + + Parallel aware +*** *New* ptscotch decomposition method +*** *Updated* particle tracking algorithm +*** *Updated* split cyclics into two separate patches. See doc/changed/splitCyclics.txt + * *Updated* interpolation (volPointInterpolation) now works without the + globalPointPatch. Moving mesh cases can now be run non-parallel and + continued in parallel and reconstructed without any limitation. +*** *New* compact binary I/O for faces and cells. This speeds up reading/writing meshes in binary. +*** *Updated* runTimeModifiable + + on linux uses inotify instead of time stamps - more efficient for large + numbers of monitored files. No more fileModificationSkew needed. + + single integer reduction instead of one reduction per monitored file. +* Solvers + A number of new solvers have been developed for a range of engineering + applications. There has been a set of improvements to certain classes of + solver that are introduced in this release. +*** *New* Solvers + + =reactingParcelFilmFoam=: Lagrangian cloud and film transport in a + reacting gas phase system + + =steadyReactingParcelFoam=: Steady solution of cloud and reacting systems + using local time stepping methods +*** Modifications to multiphase and buoyant solvers + + ... +*** Modifications to solvers for sensible enthalpy + + ... +*** Modifications to steady-state compressible solvers + + ... +*** Other modifications + + ... + +* Boundary conditions + New boundary conditions have been introduced to support new applications in + OpenFOAM. + + *New* wall functions: + + kappatJayatillekeWallFunction: incompressible RAS thermal wall function + +* Utilities + There have been some utilities added and updated in this release. +*** *New* utilities + + =extrudeToRegionMesh=: Extrude faceZones into separate mesh (as a + different region) + + used to e.g. extrude baffles (extrude internal faces) or create + liquid film regions + + if extruding internal faces: + + create baffles in original mesh with directMappedWall patches + + if extruding boundary faces: + + convert boundary faces to directMappedWall patches + + extrude edges of faceZone as a _sidePatch + + extrude edges inbetween different faceZones as a + (nonuniformTransform)cyclic _ + + extrudes into master direction (i.e. away from the owner cell + if flipMap is false) + + =topoSet=: replacement of cellSet,faceSet,pointSet utilities. + Comparable to a dictionary driven =setSet= utility. +*** Updated utilities + + =setFields=: optionally use faceSets to set patch values (see e.g. hotRoom tutorial). + + =blockMesh=: specify patches via dictionary instead of type only. This + makes rereading the boundary superfluous. see + e.g. pitzDailyDirectMapped tutorial. +* Post-processing + + =foamToEnsight=: parallel continuous data. new =-nodeValues= option to generate and output nodal + field data. + + =singleCellMesh=: new utility to convert mesh and fields to a single cell + mesh. Great for postprocessing. + + =steadyParticleTracks=: Generates VTK tracks from the output of the cloud + =ParticleTracks= post-processing sub-model + + Function objects: + + =residualControl=: new function object to allow users to terminate steady + state calculations when the defined residual levels are achieved + + =abortCalculation=: watches for presence of the named file in the + $FOAM_CASE directory and aborts the calculation if it is present + + =timeActivatedFileUpdate=: performs a file copy/replacement once a + specified time has been reached, e.g. to automagically change fvSchemes and + fvSolution during a calculation + + =streamLine=: generate streamlines; ouputs both trajectory and field data + +* New tutorials + There is a large number of new tutorials for existing and new solvers in the + release. + + =reactingParcelFilmFoam= tutorials: + + multipleBoxes, hotBoxes, panel, evaporationTest + + =interDyMFoam= tutorials: + + testTubeMixer: showcases =solidBodyMotionFunction= diff --git a/applications/solvers/DNS/dnsFoam/dnsFoam.C b/applications/solvers/DNS/dnsFoam/dnsFoam.C index fd5bbbcb83..34f212bc4d 100644 --- a/applications/solvers/DNS/dnsFoam/dnsFoam.C +++ b/applications/solvers/DNS/dnsFoam/dnsFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,15 +85,15 @@ int main(int argc, char *argv[]) for (int corr=1; corr<=1; corr++) { - volScalarField rUA = 1.0/UEqn.A(); + volScalarField rAU = 1.0/UEqn.A(); - U = rUA*UEqn.H(); + U = rAU*UEqn.H(); phi = (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, U, phi); + + fvc::ddtPhiCorr(rAU, U, phi); fvScalarMatrix pEqn ( - fvm::laplacian(rUA, p) == fvc::div(phi) + fvm::laplacian(rAU, p) == fvc::div(phi) ); pEqn.solve(); @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) #include "continuityErrs.H" - U -= rUA*fvc::grad(p); + U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); } diff --git a/applications/solvers/DNS/dnsFoam/readTransportProperties.H b/applications/solvers/DNS/dnsFoam/readTransportProperties.H index 77af096bf8..0d80908542 100644 --- a/applications/solvers/DNS/dnsFoam/readTransportProperties.H +++ b/applications/solvers/DNS/dnsFoam/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H b/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H index 20fd654cef..ba1d5dcd80 100644 --- a/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H +++ b/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H @@ -7,7 +7,7 @@ "turbulenceProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/basic/laplacianFoam/createFields.H b/applications/solvers/basic/laplacianFoam/createFields.H index 3359f2896c..616afe1a88 100644 --- a/applications/solvers/basic/laplacianFoam/createFields.H +++ b/applications/solvers/basic/laplacianFoam/createFields.H @@ -23,7 +23,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/basic/laplacianFoam/laplacianFoam.C b/applications/solvers/basic/laplacianFoam/laplacianFoam.C index 755465bb9d..0d56463754 100644 --- a/applications/solvers/basic/laplacianFoam/laplacianFoam.C +++ b/applications/solvers/basic/laplacianFoam/laplacianFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index 81df893bac..c403aa20db 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/basic/scalarTransportFoam/createFields.H b/applications/solvers/basic/scalarTransportFoam/createFields.H index 54a0bc45ec..07731be3d6 100644 --- a/applications/solvers/basic/scalarTransportFoam/createFields.H +++ b/applications/solvers/basic/scalarTransportFoam/createFields.H @@ -39,7 +39,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C index b04a5dae47..5009a081d3 100644 --- a/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C +++ b/applications/solvers/basic/scalarTransportFoam/scalarTransportFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/Make/options b/applications/solvers/combustion/PDRFoam/Make/options index a1469d0ef0..3432f09ef7 100644 --- a/applications/solvers/combustion/PDRFoam/Make/options +++ b/applications/solvers/combustion/PDRFoam/Make/options @@ -20,6 +20,7 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ -lmeshTools \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lbasicThermophysicalModels \ -lreactionThermophysicalModels \ diff --git a/applications/solvers/combustion/PDRFoam/PDRFoam.C b/applications/solvers/combustion/PDRFoam/PDRFoam.C index 7b5bb57ade..2acae0a222 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoam.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index dd78f3b2e2..2946fa52a2 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index 90fa1e53ce..8d1053ca1e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H index a74fa5c154..6c445da9e8 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C index 06c8f18312..58b39c2ec1 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index a068130df6..29ecc91ace 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C index 232972a82e..e75b6b0009 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H index 5a680e4479..223da66a0e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 0c208d44cc..4d796673a2 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 7dec3893ca..533a10d656 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H index 37a99488b9..face842875 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C index 39c2158dda..8c5ec52bed 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C @@ -50,199 +50,17 @@ PDRkEpsilon::PDRkEpsilon const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - const basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel, + const word& turbulenceModelName, + const word& modelName ) : - RASModel(typeName, rho, U, phi, thermophysicalModel), - - Cmu_ - ( - dimensioned::lookupOrAddToDict - ( - "Cmu", - coeffDict_, - 0.09 - ) - ), - C1_ - ( - dimensioned::lookupOrAddToDict - ( - "C1", - coeffDict_, - 1.44 - ) - ), - C2_ - ( - dimensioned::lookupOrAddToDict - ( - "C2", - coeffDict_, - 1.92 - ) - ), - sigmak_ - ( - dimensioned::lookupOrAddToDict - ( - "sigmak", - coeffDict_, - 1.0 - ) - ), - sigmaEps_ - ( - dimensioned::lookupOrAddToDict - ( - "sigmaEps", - coeffDict_, - 1.3 - ) - ), - Prt_ - ( - dimensioned::lookupOrAddToDict - ( - "Prt", - coeffDict_, - 1.0 - ) - ), - - k_ - ( - IOobject - ( - "k", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - autoCreateK("k", mesh_) - ), - epsilon_ - ( - IOobject - ( - "epsilon", - runTime_.timeName(), - mesh_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - autoCreateEpsilon("epsilon", mesh_) - ), - mut_ - ( - IOobject - ( - "mut", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - autoCreateMut("mut", mesh_) - ), - alphat_ - ( - IOobject - ( - "alphat", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - autoCreateAlphat("alphat", mesh_) - ) -{ - bound(epsilon_, epsilonMin_); - - mut_ = Cmu_*rho_*sqr(k_)/epsilon_; - mut_.correctBoundaryConditions(); - - alphat_ = mut_/Prt_; - alphat_.correctBoundaryConditions(); - - printCoeffs(); -} + kEpsilon(rho, U, phi, thermophysicalModel, turbulenceModelName, modelName) +{} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp PDRkEpsilon::R() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "R", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - ((2.0/3.0)*I)*k_ - (mut_/rho_)*dev(twoSymm(fvc::grad(U_))), - k_.boundaryField().types() - ) - ); -} - - -tmp PDRkEpsilon::devRhoReff() const -{ - return tmp - ( - new volSymmTensorField - ( - IOobject - ( - "devRhoReff", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -muEff()*dev(twoSymm(fvc::grad(U_))) - ) - ); -} - - -tmp PDRkEpsilon::divDevRhoReff(volVectorField& U) const -{ - return - ( - - fvm::laplacian(muEff(), U) - fvc::div(muEff()*dev2(fvc::grad(U)().T())) - ); -} - - -bool PDRkEpsilon::read() -{ - if (RASModel::read()) - { - Cmu_.readIfPresent(coeffDict_); - C1_.readIfPresent(coeffDict_); - C2_.readIfPresent(coeffDict_); - sigmak_.readIfPresent(coeffDict()); - sigmaEps_.readIfPresent(coeffDict()); - Prt_.readIfPresent(coeffDict()); - - return true; - } - else - { - return false; - } -} - - void PDRkEpsilon::correct() { if (!turbulence_) @@ -271,7 +89,7 @@ void PDRkEpsilon::correct() volScalarField G("RASModel::G", mut_*(tgradU() && dev(twoSymm(tgradU())))); tgradU.clear(); - // Update espsilon and G at the wall + // Update epsilon and G at the wall epsilon_.boundaryField().updateCoeffs(); // Add the blockage generation term so that it is included consistently @@ -320,6 +138,7 @@ void PDRkEpsilon::correct() solve(kEqn); bound(k_, kMin_); + // Re-calculate viscosity mut_ = rho_*Cmu_*sqr(k_)/epsilon_; mut_.correctBoundaryConditions(); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H index 483c7257dc..4f3d63db67 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,12 +25,13 @@ Class Foam::compressible::RASModels::PDRkEpsilon Description - Standard k-epsilon turbulence model with additional source terms + Standard k-epsilon turbulence model for compressible flow + with additional source terms corresponding to PDR basic drag model (\link basic.H \endlink) The default model coefficients correspond to the following: @verbatim - kEpsilonCoeffs + PDRkEpsilonCoeffs { Cmu 0.09; C1 1.44; @@ -53,7 +54,6 @@ Description SourceFiles PDRkEpsilon.C - PDRkEpsilonCorrect.C \*---------------------------------------------------------------------------*/ @@ -61,6 +61,7 @@ SourceFiles #define compressiblePDRkEpsilon_H #include "RASModel.H" +#include "kEpsilon.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -77,26 +78,8 @@ namespace RASModels class PDRkEpsilon : - public RASModel + public kEpsilon { - // Private data - - // Model coefficients - - dimensionedScalar Cmu_; - dimensionedScalar C1_; - dimensionedScalar C2_; - dimensionedScalar sigmak_; - dimensionedScalar sigmaEps_; - dimensionedScalar Prt_; - - // Fields - - volScalarField k_; - volScalarField epsilon_; - volScalarField mut_; - volScalarField alphat_; - public: @@ -112,7 +95,9 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - const basicThermo& thermophysicalModel + const basicThermo& thermophysicalModel, + const word& turbulenceModelName = turbulenceModel::typeName, + const word& modelName = typeName ); @@ -123,62 +108,9 @@ public: // Member Functions - //- Return the effective diffusivity for k - tmp DkEff() const - { - return tmp - ( - new volScalarField("DkEff", mut_/sigmak_ + mu()) - ); - } - - //- Return the effective diffusivity for epsilon - tmp DepsilonEff() const - { - return tmp - ( - new volScalarField("DepsilonEff", mut_/sigmaEps_ + mu()) - ); - } - - //- Return the turbulence viscosity - virtual tmp mut() const - { - return mut_; - } - - //- Return the turbulence thermal diffusivity - virtual tmp alphat() const - { - return alphat_; - } - - //- Return the turbulence kinetic energy - virtual tmp k() const - { - return k_; - } - - //- Return the turbulence kinetic energy dissipation rate - virtual tmp epsilon() const - { - return epsilon_; - } - - //- Return the Reynolds stress tensor - virtual tmp R() const; - - //- Return the effective stress tensor including the laminar stress - virtual tmp devRhoReff() const; - - //- Return the source term for the momentum equation - virtual tmp divDevRhoReff(volVectorField& U) const; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct(); - //- Read turbulenceProperties dictionary - virtual bool read(); }; diff --git a/applications/solvers/combustion/PDRFoam/StCourantNo.H b/applications/solvers/combustion/PDRFoam/StCourantNo.H index 5843271733..8fac05d81c 100644 --- a/applications/solvers/combustion/PDRFoam/StCourantNo.H +++ b/applications/solvers/combustion/PDRFoam/StCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,17 +34,14 @@ Description if (mesh.nInternalFaces()) { - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs() - *mag(phiSt/fvc::interpolate(rho)); + scalarField sumPhi = + fvc::surfaceSum(mag(phiSt))().internalField() + /rho.internalField(); - StCoNum = - max(SfUfbyDelta/mesh.magSf()).value() - *runTime.deltaTValue(); + StCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); meanStCoNum = - (sum(SfUfbyDelta)/sum(mesh.magSf())).value() - *runTime.deltaTValue(); + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); } Info<< "St courant Number mean: " << meanStCoNum diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C index 8787d16706..bfd6dee810 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H index 358408fd1d..d8e8263ff6 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/Gulder/Gulder.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C index dc3aded366..2a1642257b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H index 94dd8f8f9f..9eb000adf2 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 385b9e53f0..a59abab698 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -62,7 +62,7 @@ Foam::XiEqModels::SCOPEXiEq::SCOPEXiEq "combustionProperties", Su.mesh().time().constant(), Su.mesh(), - IOobject::MUST_READ + IOobject::MUST_READ_IF_MODIFIED ) ), thermo diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 11828420d5..94b6b08ae5 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 5bc94536a0..6d7a35867a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H index 20aa33ca4d..9145239948 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index 6f347bbe2d..caba3d2835 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C index 796e847660..4fde0ef168 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H index d703b30308..d7e0e6c308 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C index 99a4cf8af2..ab94c070b1 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H index 82b801df0d..3ca8dc633b 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/KTS/KTS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C index e73d0a9814..92189df881 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H index d9fd7eafc6..a34b967d47 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index b675e7f334..3300a15c6a 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C index 132044c260..33c5163056 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H index bf8ad5af85..f447049fd7 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/instabilityG/instabilityG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C index 9915ca4a2a..82f68ca6ba 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H index bfa0b30523..7cdeb1d3ef 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index a77f8e8a20..3e5410f80d 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C index 570a379ac8..0beca272cc 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H index 9093c0dd45..13ff3f23b9 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/algebraic/algebraic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C index d14e0ab56f..f689a6d3cb 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H index 50252b94d2..56935c243c 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/fixed/fixed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C index fdb9e11bc4..782638ef1c 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H index b6b000cc78..1807dafcca 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/transport/transport.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/createFields.H b/applications/solvers/combustion/PDRFoam/createFields.H index 74a18ab6f5..233383ab1c 100644 --- a/applications/solvers/combustion/PDRFoam/createFields.H +++ b/applications/solvers/combustion/PDRFoam/createFields.H @@ -110,7 +110,7 @@ "PDRProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index fec95fd083..9a66d302a7 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H index 29c43803b5..2692128494 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/pEqn.H b/applications/solvers/combustion/PDRFoam/pEqn.H index 524c8eac74..9042837f54 100644 --- a/applications/solvers/combustion/PDRFoam/pEqn.H +++ b/applications/solvers/combustion/PDRFoam/pEqn.H @@ -1,6 +1,6 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); +volScalarField rAU = 1.0/UEqn.A(); U = invA & UEqn.H(); if (transonic) @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -38,7 +38,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) diff --git a/applications/solvers/combustion/PDRFoam/readCombustionProperties.H b/applications/solvers/combustion/PDRFoam/readCombustionProperties.H index 9f4435b251..acc5cb7868 100644 --- a/applications/solvers/combustion/PDRFoam/readCombustionProperties.H +++ b/applications/solvers/combustion/PDRFoam/readCombustionProperties.H @@ -7,7 +7,7 @@ "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/PDRFoam/rhoEqn.H b/applications/solvers/combustion/PDRFoam/rhoEqn.H index ca87bee9ea..b6e9d5fa6f 100644 --- a/applications/solvers/combustion/PDRFoam/rhoEqn.H +++ b/applications/solvers/combustion/PDRFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/PDRFoam/setDeltaT.H b/applications/solvers/combustion/PDRFoam/setDeltaT.H index 1b2278283b..9b2710d7b1 100644 --- a/applications/solvers/combustion/PDRFoam/setDeltaT.H +++ b/applications/solvers/combustion/PDRFoam/setDeltaT.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/Make/options b/applications/solvers/combustion/XiFoam/Make/options index c328b2c1b3..66dae7fcb3 100644 --- a/applications/solvers/combustion/XiFoam/Make/options +++ b/applications/solvers/combustion/XiFoam/Make/options @@ -10,6 +10,7 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lbasicThermophysicalModels \ diff --git a/applications/solvers/combustion/XiFoam/XiFoam.C b/applications/solvers/combustion/XiFoam/XiFoam.C index bab7984aef..7292a06d27 100644 --- a/applications/solvers/combustion/XiFoam/XiFoam.C +++ b/applications/solvers/combustion/XiFoam/XiFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/XiFoam/pEqn.H b/applications/solvers/combustion/XiFoam/pEqn.H index 9443f909a3..3d414f4af6 100644 --- a/applications/solvers/combustion/XiFoam/pEqn.H +++ b/applications/solvers/combustion/XiFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -38,7 +38,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -47,7 +47,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -62,7 +62,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/XiFoam/readCombustionProperties.H b/applications/solvers/combustion/XiFoam/readCombustionProperties.H index da0a3a94a2..58b0626fb4 100644 --- a/applications/solvers/combustion/XiFoam/readCombustionProperties.H +++ b/applications/solvers/combustion/XiFoam/readCombustionProperties.H @@ -7,7 +7,7 @@ "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options index 53aa22b25a..dfd9248ded 100644 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ b/applications/solvers/combustion/coldEngineFoam/Make/options @@ -10,6 +10,7 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lbasicThermophysicalModels \ diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C index 0645fdccf4..29dbb640a1 100644 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/coldEngineFoam/logSummary.H b/applications/solvers/combustion/coldEngineFoam/logSummary.H index d2a6bcee2d..5a33f48764 100644 --- a/applications/solvers/combustion/coldEngineFoam/logSummary.H +++ b/applications/solvers/combustion/coldEngineFoam/logSummary.H @@ -1,6 +1,8 @@ Info<< "Mean pressure:" << p.weightedAverage(mesh.V()).value() << endl; Info<< "Mean temperature:" << T.weightedAverage(mesh.V()).value() << endl; -Info<< "Mean u':" << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() << endl; +Info<< "Mean u':" + << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() + << endl; logSummaryFile << runTime.theta() << tab diff --git a/applications/solvers/combustion/dieselEngineFoam/Make/options b/applications/solvers/combustion/dieselEngineFoam/Make/options index 60558513fe..9a45247819 100644 --- a/applications/solvers/combustion/dieselEngineFoam/Make/options +++ b/applications/solvers/combustion/dieselEngineFoam/Make/options @@ -2,6 +2,7 @@ EXE_INC = \ -I../engineFoam \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ @@ -18,11 +19,13 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lreactionThermophysicalModels \ -lfiniteVolume \ -llagrangian \ + -lmeshTools \ -ldieselSpray \ -lliquids \ -lliquidMixture \ diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index 9040033d12..8ea5d32e5f 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/dieselEngineFoam/logSummary.H b/applications/solvers/combustion/dieselEngineFoam/logSummary.H index d2a6bcee2d..5a33f48764 100644 --- a/applications/solvers/combustion/dieselEngineFoam/logSummary.H +++ b/applications/solvers/combustion/dieselEngineFoam/logSummary.H @@ -1,6 +1,8 @@ Info<< "Mean pressure:" << p.weightedAverage(mesh.V()).value() << endl; Info<< "Mean temperature:" << T.weightedAverage(mesh.V()).value() << endl; -Info<< "Mean u':" << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() << endl; +Info<< "Mean u':" + << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() + << endl; logSummaryFile << runTime.theta() << tab diff --git a/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H b/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H index 687d83ea94..84cf9b9756 100644 --- a/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H +++ b/applications/solvers/combustion/dieselEngineFoam/readCombustionProperties.H @@ -7,7 +7,7 @@ IOdictionary combustionProperties "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H b/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H index 4ec16056d2..bd6a9b5a6f 100644 --- a/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/dieselFoam/Make/options b/applications/solvers/combustion/dieselFoam/Make/options index 28605eb830..3b1786aa08 100644 --- a/applications/solvers/combustion/dieselFoam/Make/options +++ b/applications/solvers/combustion/dieselFoam/Make/options @@ -3,6 +3,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/lagrangian/dieselSpray/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \ @@ -16,10 +17,12 @@ EXE_INC = \ -I$(LIB_SRC)/ODE/lnInclude EXE_LIBS = \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lreactionThermophysicalModels \ -llagrangian \ + -lmeshTools \ -ldieselSpray \ -lliquids \ -lliquidMixture \ diff --git a/applications/solvers/combustion/dieselFoam/dieselFoam.C b/applications/solvers/combustion/dieselFoam/dieselFoam.C index a5dca0968a..3bbebfd5ff 100644 --- a/applications/solvers/combustion/dieselFoam/dieselFoam.C +++ b/applications/solvers/combustion/dieselFoam/dieselFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/dieselFoam/pEqn.H b/applications/solvers/combustion/dieselFoam/pEqn.H index d74947fe53..f1b66877a0 100644 --- a/applications/solvers/combustion/dieselFoam/pEqn.H +++ b/applications/solvers/combustion/dieselFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) == Sevap ); @@ -40,7 +40,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -49,7 +49,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) == Sevap ); @@ -66,7 +66,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/engineFoam/Make/options b/applications/solvers/combustion/engineFoam/Make/options index 31775e03d6..cf5fa5febe 100644 --- a/applications/solvers/combustion/engineFoam/Make/options +++ b/applications/solvers/combustion/engineFoam/Make/options @@ -10,6 +10,7 @@ EXE_INC = \ EXE_LIBS = \ -lengine \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lbasicThermophysicalModels \ diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index 9a58e5fce3..e3bba32330 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/engineFoam/logSummary.H b/applications/solvers/combustion/engineFoam/logSummary.H index 5abe9abe7b..24d8812008 100644 --- a/applications/solvers/combustion/engineFoam/logSummary.H +++ b/applications/solvers/combustion/engineFoam/logSummary.H @@ -1,6 +1,8 @@ Info<< "Mean pressure:" << p.weightedAverage(mesh.V()).value() << endl; Info<< "Mean temperature:" << T.weightedAverage(mesh.V()).value() << endl; -Info<< "Mean u':" << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() << endl; +Info<< "Mean u':" + << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() + << endl; logSummaryFile << runTime.theta() << tab diff --git a/applications/solvers/combustion/engineFoam/pEqn.H b/applications/solvers/combustion/engineFoam/pEqn.H index 39b4967312..913180f794 100644 --- a/applications/solvers/combustion/engineFoam/pEqn.H +++ b/applications/solvers/combustion/engineFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -18,7 +18,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p, "div(phid,p)") - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -40,7 +40,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -55,7 +55,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/fireFoam/Make/options b/applications/solvers/combustion/fireFoam/Make/options index 3b19a78173..cba08b2629 100644 --- a/applications/solvers/combustion/fireFoam/Make/options +++ b/applications/solvers/combustion/fireFoam/Make/options @@ -14,6 +14,7 @@ EXE_LIBS = \ -lreactionThermophysicalModels \ -lbasicThermophysicalModels \ -lfiniteVolume \ + -lcompressibleTurbulenceModel \ -lcompressibleLESModels \ -lcompressibleRASModels \ -lradiation diff --git a/applications/solvers/combustion/fireFoam/UEqn.H b/applications/solvers/combustion/fireFoam/UEqn.H index 3b61f2c7b9..a77c262831 100644 --- a/applications/solvers/combustion/fireFoam/UEqn.H +++ b/applications/solvers/combustion/fireFoam/UEqn.H @@ -7,30 +7,15 @@ fvVectorMatrix UEqn UEqn.relax(); -if (oCorr == nOuterCorr - 1) -{ - solve +solve +( + UEqn + == + fvc::reconstruct ( - UEqn - == - fvc::reconstruct ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ), - mesh.solver("UFinal") - ); -} -else -{ - solve - ( - UEqn - == - fvc::reconstruct - ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - ); -} + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p_rgh) + )*mesh.magSf() + ) +); diff --git a/applications/solvers/combustion/fireFoam/combustionModels/Make/files b/applications/solvers/combustion/fireFoam/combustionModels/Make/files index 86696b0709..5b1262b70d 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/Make/files +++ b/applications/solvers/combustion/fireFoam/combustionModels/Make/files @@ -1,5 +1,5 @@ combustionModel/combustionModel.C -combustionModel/combustionModelNew.C +combustionModel/newCombustionModel.C infinitelyFastChemistry/infinitelyFastChemistry.C diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C index b3b3530212..ddfecc74b0 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H index c3cc533194..354ad0ccaa 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C similarity index 75% rename from applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C rename to applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C index ff1e54b0dc..62781b0fdb 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,19 +29,22 @@ License Foam::autoPtr Foam::combustionModel::New ( - const dictionary& propDict, + const dictionary& combustionProperties, const hsCombustionThermo& thermo, const compressible::turbulenceModel& turbulence, const surfaceScalarField& phi, const volScalarField& rho ) { - const word modelType(propDict.lookup("combustionModel")); + word combustionModelTypeName = combustionProperties.lookup + ( + "combustionModel" + ); - Info<< "Selecting combustion model " << modelType << endl; + Info<< "Selecting combustion model " << combustionModelTypeName << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelType); + dictionaryConstructorTablePtr_->find(combustionModelTypeName); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -49,14 +52,14 @@ Foam::autoPtr Foam::combustionModel::New ( "combustionModel::New" ) << "Unknown combustionModel type " - << modelType << nl << nl - << "Valid combustionModels are : " << endl - << dictionaryConstructorTablePtr_->toc() + << combustionModelTypeName << endl << endl + << "Valid combustionModels are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } return autoPtr - (cstrIter()(propDict, thermo, turbulence, phi, rho)); + (cstrIter()(combustionProperties, thermo, turbulence, phi, rho)); } diff --git a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index ad365c3507..cd708d8dc7 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H index ad8b8837e3..53832f21b9 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H +++ b/applications/solvers/combustion/fireFoam/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,8 +88,9 @@ public: ); - //- Destructor - virtual ~infinitelyFastChemistry(); + // Destructor + + virtual ~infinitelyFastChemistry(); // Member Functions diff --git a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C index 4ecdac79c8..9183844ba7 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H index 1ff9a95d77..b3f8bb225e 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H +++ b/applications/solvers/combustion/fireFoam/combustionModels/noCombustion/noCombustion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -83,8 +83,9 @@ public: ); - //- Destructor - virtual ~noCombustion(); + // Destructor + + virtual ~noCombustion(); // Member Functions diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 95bda05606..6a1a40b777 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -35,6 +35,7 @@ const volScalarField& psi = thermo.psi(); volScalarField& ft = composition.Y("ft"); volScalarField& fu = composition.Y("fu"); + Info<< "Reading field U\n" << endl; volVectorField U @@ -65,7 +66,7 @@ IOdictionary combustionProperties "combustionProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); @@ -73,7 +74,7 @@ IOdictionary combustionProperties Info<< "Creating combustion model\n" << endl; autoPtr combustion ( - combustionModel::New + combustionModel::combustionModel::New ( combustionProperties, thermo, @@ -83,6 +84,29 @@ autoPtr combustion ) ); + +Info<< "Calculating field g.h\n" << endl; +volScalarField gh("gh", g & mesh.C()); +surfaceScalarField ghf("gh", g & mesh.Cf()); + +Info<< "Reading field p_rgh\n" << endl; +volScalarField p_rgh +( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + +// Force p_rgh to be consistent with p +p_rgh = p - rho*gh; + + volScalarField dQ ( IOobject @@ -103,15 +127,6 @@ volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); -Info<< "Calculating field g.h\n" << endl; -volScalarField gh("gh", g & mesh.C()); - -surfaceScalarField ghf("gh", g & mesh.Cf()); - -p += rho*gh; - -thermo.correct(); - dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/combustion/fireFoam/fireFoam.C b/applications/solvers/combustion/fireFoam/fireFoam.C index 20f418e035..32727d6f34 100644 --- a/applications/solvers/combustion/fireFoam/fireFoam.C +++ b/applications/solvers/combustion/fireFoam/fireFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,6 +70,12 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); diff --git a/applications/solvers/combustion/fireFoam/pEqn.H b/applications/solvers/combustion/fireFoam/pEqn.H index 907398581f..135b55d879 100644 --- a/applications/solvers/combustion/fireFoam/pEqn.H +++ b/applications/solvers/combustion/fireFoam/pEqn.H @@ -1,64 +1,58 @@ -bool closedVolume = false; - rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); +U = rAU*UEqn.H(); surfaceScalarField phiU ( fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); -phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); +phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf(); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - surfaceScalarField rhorUAf = fvc::interpolate(rho*rUA); + surfaceScalarField rhorAUf = fvc::interpolate(rho*rAU); - fvScalarMatrix pEqn + fvScalarMatrix p_rghEqn + ( + fvm::ddt(psi, p_rgh) + fvc::ddt(psi, rho)*gh + + fvc::div(phi) + - fvm::laplacian(rhorAUf, p_rgh) + ); + + p_rghEqn.solve + ( + mesh.solver ( - fvm::ddt(psi,p) - + fvc::div(phi) - - fvm::laplacian(rhorUAf, p) - ); + p_rgh.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); - closedVolume = p.needReference(); - - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi += pEqn.flux(); - } + if (nonOrth == nNonOrthCorr) + { + phi += p_rghEqn.flux(); + } } -DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); +p = p_rgh + rho*gh; #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); +U += rAU*fvc::reconstruct((phi - phiU)/rhorAUf); U.correctBoundaryConditions(); -// For closed-volume cases adjust the pressure and density levels -// to obey overall mass continuity -if (closedVolume) -{ - p += - (initialMass - fvc::domainIntegrate(thermo.psi()*p)) - /fvc::domainIntegrate(thermo.psi()); - rho = thermo.rho(); -} +DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/reactingFoam/Make/options b/applications/solvers/combustion/reactingFoam/Make/options index d85350297a..6386af8c55 100644 --- a/applications/solvers/combustion/reactingFoam/Make/options +++ b/applications/solvers/combustion/reactingFoam/Make/options @@ -8,6 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lreactionThermophysicalModels \ diff --git a/applications/solvers/combustion/reactingFoam/chemistry.H b/applications/solvers/combustion/reactingFoam/chemistry.H index 8bfa872d7b..d7faf86b0c 100644 --- a/applications/solvers/combustion/reactingFoam/chemistry.H +++ b/applications/solvers/combustion/reactingFoam/chemistry.H @@ -11,7 +11,7 @@ if (turbulentReaction) { volScalarField tk = - Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); + Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); volScalarField tc = chemistry.tc(); // Chalmers PaSR model diff --git a/applications/solvers/combustion/reactingFoam/pEqn.H b/applications/solvers/combustion/reactingFoam/pEqn.H index 9443f909a3..3d414f4af6 100644 --- a/applications/solvers/combustion/reactingFoam/pEqn.H +++ b/applications/solvers/combustion/reactingFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); if (transonic) { @@ -11,7 +11,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -21,7 +21,7 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -38,7 +38,7 @@ else fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -47,7 +47,7 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -62,7 +62,7 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index 677b7d6c4e..3f0ce1d89a 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/combustion/reactingFoam/readChemistryProperties.H b/applications/solvers/combustion/reactingFoam/readChemistryProperties.H index ab51afe283..f0bcf7597f 100644 --- a/applications/solvers/combustion/reactingFoam/readChemistryProperties.H +++ b/applications/solvers/combustion/reactingFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/combustion/rhoReactingFoam/Make/options b/applications/solvers/combustion/rhoReactingFoam/Make/options index d85350297a..6386af8c55 100644 --- a/applications/solvers/combustion/rhoReactingFoam/Make/options +++ b/applications/solvers/combustion/rhoReactingFoam/Make/options @@ -8,6 +8,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lreactionThermophysicalModels \ diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H index a58cd28dec..45ae3c1e5f 100644 --- a/applications/solvers/combustion/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -5,14 +5,14 @@ // pressure solution - done in 2 parts. Part 1: thermo.rho() -= psi*p; - volScalarField rUA = 1.0/UEqn.A(); - U = rUA*UEqn.H(); + volScalarField rAU = 1.0/UEqn.A(); + U = rAU*UEqn.H(); if (transonic) { surfaceScalarField phiv = (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi); + + fvc::ddtPhiCorr(rAU, rho, U, phi); phi = fvc::interpolate(rho)*phiv; @@ -28,17 +28,23 @@ ( fvc::ddt(rho) + fvc::div(phi) + correction(fvm::ddt(psi, p) + fvm::div(phid, p)) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -52,7 +58,7 @@ fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -61,17 +67,23 @@ ( fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(); - } + pEqn.solve + ( + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -86,7 +98,7 @@ #include "rhoEqn.H" #include "compressibleContinuityErrs.H" - U -= rUA*fvc::grad(p); + U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H index ab51afe283..f0bcf7597f 100644 --- a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H +++ b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H @@ -7,7 +7,7 @@ IOdictionary chemistryProperties "chemistryProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE, false ) diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index 3a5bb614fe..7b160ec666 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -69,8 +69,14 @@ int main(int argc, char *argv[]) #include "chemistry.H" #include "rhoEqn.H" - for (label ocorr=1; ocorr <= nOuterCorr; ocorr++) + for (label oCorr=1; oCorr <= nOuterCorr; oCorr++) { + bool finalIter = oCorr == nOuterCorr-1; + if (finalIter) + { + mesh.data::add("finalIteration", true); + } + #include "UEqn.H" #include "YEqn.H" #include "hsEqn.H" @@ -80,6 +86,11 @@ int main(int argc, char *argv[]) { #include "pEqn.H" } + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } turbulence->correct(); diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C index a6d98559a7..08c4354c3a 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,14 +29,9 @@ License #include "volFields.H" #include "mathematicalConstants.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField +Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF @@ -52,7 +47,8 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField valueFraction() = 0.0; } -smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField + +Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ( const smoluchowskiJumpTFvPatchScalarField& ptf, const fvPatch& p, @@ -67,7 +63,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField {} -smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField +Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ( const fvPatch& p, const DimensionedField& iF, @@ -118,7 +114,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField } -smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField +Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField ( const smoluchowskiJumpTFvPatchScalarField& ptpsf, const DimensionedField& iF @@ -134,7 +130,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // Map from self -void smoluchowskiJumpTFvPatchScalarField::autoMap +void Foam::smoluchowskiJumpTFvPatchScalarField::autoMap ( const fvPatchFieldMapper& m ) @@ -144,7 +140,7 @@ void smoluchowskiJumpTFvPatchScalarField::autoMap // Reverse-map the given fvPatchField onto this fvPatchField -void smoluchowskiJumpTFvPatchScalarField::rmap +void Foam::smoluchowskiJumpTFvPatchScalarField::rmap ( const fvPatchField& ptf, const labelList& addr @@ -155,7 +151,7 @@ void smoluchowskiJumpTFvPatchScalarField::rmap // Update the coefficients associated with the patch field -void smoluchowskiJumpTFvPatchScalarField::updateCoeffs() +void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs() { if (updated()) { @@ -174,11 +170,16 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs() // Prandtl number reading consistent with rhoCentralFoam const dictionary& thermophysicalProperties = db().lookupObject("thermophysicalProperties"); - dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0); - if (thermophysicalProperties.found("Pr")) - { - Pr = thermophysicalProperties.lookup("Pr"); - } + + dimensionedScalar Pr + ( + dimensionedScalar::lookupOrDefault + ( + "Pr", + thermophysicalProperties, + 1.0 + ) + ); Field C2 = pmu/prho *sqrt(ppsi*constant::mathematical::piByTwo) @@ -197,7 +198,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs() // Write -void smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const +void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const { fvPatchScalarField::write(os); os.writeKeyword("accommodationCoeff") @@ -211,10 +212,12 @@ void smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +namespace Foam +{ + makePatchTypeField(fvPatchScalarField, smoluchowskiJumpTFvPatchScalarField); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} -} // End namespace Foam // ************************************************************************* // diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H index bc6fab1115..526b37d3c2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index 80abda6e25..4962a338a1 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,8 +28,7 @@ License #include "mathematicalConstants.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "surfaceFields.H" -#include "fvCFD.H" +#include "fvcGrad.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -129,7 +128,6 @@ maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -// Update the coefficients associated with the patch field void maxwellSlipUFvPatchVectorField::updateCoeffs() { if (updated()) @@ -177,7 +175,6 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs() } -// Write void maxwellSlipUFvPatchVectorField::write(Ostream& os) const { fvPatchVectorField::write(os); diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H index cf3122eb86..258e06f01c 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,14 +45,13 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class maxwellSlipUFvPatch Declaration + Class maxwellSlipUFvPatch Declaration \*---------------------------------------------------------------------------*/ class maxwellSlipUFvPatchVectorField : public mixedFixedValueSlipFvPatchVectorField { - // Private data // Accommodation coefficient @@ -67,6 +66,7 @@ class maxwellSlipUFvPatchVectorField // Include boundary curvature term (default on) Switch curvature_; + public: //- Runtime type information @@ -128,6 +128,7 @@ public: ); } + // Member functions //- Update the coefficients associated with the patch field diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C index 42e71cc29f..253b2c8af1 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,7 +171,8 @@ void mixedFixedValueSlipFvPatchField::evaluate(const Pstream::commsTypes) // Return defining fields template -tmp > mixedFixedValueSlipFvPatchField::snGradTransformDiag() const +tmp > +mixedFixedValueSlipFvPatchField::snGradTransformDiag() const { vectorField nHat = this->patch().nf(); vectorField diag(nHat.size()); @@ -182,7 +183,8 @@ tmp > mixedFixedValueSlipFvPatchField::snGradTransformDiag() c return valueFraction_*Type(pTraits::one) - + (1.0 - valueFraction_)*transformFieldMask(pow::rank>(diag)); + + (1.0 - valueFraction_) + *transformFieldMask(pow::rank>(diag)); } diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H index c1f98d6c4b..005f9de897 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.C b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.C index 147b967556..a1444724f0 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.H b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.H index 87c77fb007..142ed89fc2 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFieldsFwd.H b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFieldsFwd.H index 136a016449..818cb7ecaa 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFieldsFwd.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/mixedFixedValueSlip/mixedFixedValueSlipFvPatchFieldsFwd.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C index e02c79d728..ca9e9d0158 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H index 28658daf2f..6f6464d0e0 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H b/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H index 890f3ec96a..50d75b7855 100644 --- a/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H +++ b/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H b/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H index 9f54c43ef3..13f8f02c9c 100644 --- a/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H +++ b/applications/solvers/compressible/rhoCentralFoam/readFluxScheme.H @@ -1,7 +1,6 @@ word fluxScheme("Kurganov"); -if (mesh.schemesDict().found("fluxScheme")) +if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme)) { - fluxScheme = word(mesh.schemesDict().lookup("fluxScheme")); if ((fluxScheme == "Tadmor") || (fluxScheme == "Kurganov")) { Info<< "fluxScheme: " << fluxScheme << endl; diff --git a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H index 435bcb7745..f9e309ffec 100644 --- a/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H +++ b/applications/solvers/compressible/rhoCentralFoam/readThermophysicalProperties.H @@ -9,14 +9,18 @@ IOdictionary thermophysicalProperties "thermophysicalProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); -dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0); +dimensionedScalar Pr +( + dimensionedScalar::lookupOrDefault + ( + "Pr", + thermophysicalProperties, + 1.0 + ) +); -if (thermophysicalProperties.found("Pr")) -{ - Pr = thermophysicalProperties.lookup("Pr"); -} diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 274a8e80be..2fc874981e 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 218cfc1229..1f77191f4c 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,11 +90,15 @@ int main(int argc, char *argv[]) surfaceScalarField phiv_neg = U_neg & mesh.Sf(); volScalarField c = sqrt(thermo.Cp()/thermo.Cv()*rPsi); - surfaceScalarField cSf_pos = fvc::interpolate(c, pos, "reconstruct(T)")*mesh.magSf(); - surfaceScalarField cSf_neg = fvc::interpolate(c, neg, "reconstruct(T)")*mesh.magSf(); + surfaceScalarField cSf_pos = + fvc::interpolate(c, pos, "reconstruct(T)")*mesh.magSf(); + surfaceScalarField cSf_neg = + fvc::interpolate(c, neg, "reconstruct(T)")*mesh.magSf(); - surfaceScalarField ap = max(max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero); - surfaceScalarField am = min(min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero); + surfaceScalarField ap = + max(max(phiv_pos + cSf_pos, phiv_neg + cSf_neg), v_zero); + surfaceScalarField am = + min(min(phiv_pos - cSf_pos, phiv_neg - cSf_neg), v_zero); surfaceScalarField a_pos = ap/(ap - am); diff --git a/applications/solvers/compressible/rhoPimpleFoam/Make/options b/applications/solvers/compressible/rhoPimpleFoam/Make/options index 4858e53f30..47a62ae92a 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPimpleFoam/Make/options @@ -7,6 +7,7 @@ EXE_INC = \ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H index 9c12cf9585..45aa8f7790 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/UEqn.H @@ -7,30 +7,16 @@ tmp UEqn + turbulence->divDevRhoReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); -volScalarField rUA = 1.0/UEqn().A(); +volScalarField rAU = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { - U = rUA*(UEqn().H() - fvc::grad(p)); + U = rAU*(UEqn().H() - fvc::grad(p)); U.correctBoundaryConditions(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/createFields.H index 1433ea5cc3..4642e10ef8 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/createFields.H @@ -37,12 +37,7 @@ mesh ); -# include "compressibleCreatePhi.H" - - dimensionedScalar pMin - ( - mesh.solutionDict().subDict("PIMPLE").lookup("pMin") - ); + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -56,9 +51,6 @@ ) ); - //dimensionedScalar initialMass = fvc::domainIntegrate(rho); - - Info<< "Creating field DpDt\n" << endl; volScalarField DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPimpleFoam/hEqn.H b/applications/solvers/compressible/rhoPimpleFoam/hEqn.H index e66b99442b..3125cc3ffa 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/hEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/hEqn.H @@ -8,16 +8,8 @@ DpDt ); - if (oCorr == nOuterCorr-1) - { - hEqn.relax(); - hEqn.solve(mesh.solver("hFinal")); - } - else - { - hEqn.relax(); - hEqn.solve(); - } + hEqn.relax(); + hEqn.solve(); thermo.correct(); } diff --git a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H index 0f3dfe450b..84e6451890 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPimpleFoam/pEqn.H @@ -1,7 +1,6 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn().A(); -U = rUA*UEqn().H(); +U = rAU*UEqn().H(); if (nCorr <= 1) { @@ -16,7 +15,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -26,22 +25,23 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -55,7 +55,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - //+ fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) @@ -65,22 +65,23 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -92,30 +93,15 @@ else #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -//if (oCorr != nOuterCorr-1) -{ - // Explicitly relax pressure for momentum corrector - p.relax(); +// Explicitly relax pressure for momentum corrector +p.relax(); - rho = thermo.rho(); - rho.relax(); - Info<< "rho max/min : " << max(rho).value() - << " " << min(rho).value() << endl; -} +// Recalculate density from the relaxed pressure +rho = thermo.rho(); +Info<< "rho max/min : " << max(rho).value() + << " " << min(rho).value() << endl; -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - -bound(p, pMin); - -// For closed-volume cases adjust the pressure and density levels -// to obey overall mass continuity -/* -if (closedVolume) -{ - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); -} -*/ diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index d4055f658d..8164361cf6 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,15 +61,22 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - rho.storePrevIter(); - } + #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/files b/applications/solvers/compressible/rhoPisoFoam/Make/files deleted file mode 100644 index 3c89295014..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoPisoFoam.C - -EXE = $(FOAM_APPBIN)/rhoPisoFoam diff --git a/applications/solvers/compressible/rhoPisoFoam/UEqn.H b/applications/solvers/compressible/rhoPisoFoam/UEqn.H deleted file mode 100644 index 64dd52b1b0..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/UEqn.H +++ /dev/null @@ -1,11 +0,0 @@ - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - + turbulence->divDevRhoReff(U) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/compressible/rhoPisoFoam/hEqn.H b/applications/solvers/compressible/rhoPisoFoam/hEqn.H deleted file mode 100644 index ae60d3316e..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/hEqn.H +++ /dev/null @@ -1,12 +0,0 @@ -{ - solve - ( - fvm::ddt(rho, h) - + fvm::div(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - DpDt - ); - - thermo.correct(); -} diff --git a/applications/solvers/compressible/rhoPisoFoam/pEqn.H b/applications/solvers/compressible/rhoPisoFoam/pEqn.H deleted file mode 100644 index 280842ecc3..0000000000 --- a/applications/solvers/compressible/rhoPisoFoam/pEqn.H +++ /dev/null @@ -1,68 +0,0 @@ -rho = thermo.rho(); - -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); - -if (transonic) -{ - surfaceScalarField phid - ( - "phid", - fvc::interpolate(psi) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi == pEqn.flux(); - } - } -} -else -{ - phi = - fvc::interpolate(rho)* - ( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phi += pEqn.flux(); - } - } -} - -#include "rhoEqn.H" -#include "compressibleContinuityErrs.H" - -U -= rUA*fvc::grad(p); -U.correctBoundaryConditions(); - -DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/Make/options b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/Make/options index 61c1b6fe46..809b4a63a1 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/Make/options @@ -9,6 +9,7 @@ EXE_INC = \ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H index 3b4ead17e7..0b0364b706 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/UEqn.H @@ -7,33 +7,19 @@ tmp UEqn + turbulence->divDevRhoReff(U) ); -if (oCorr == nOuterCorr-1) -{ - UEqn().relax(1); -} -else -{ - UEqn().relax(); -} +UEqn().relax(); mrfZones.addCoriolis(rho, UEqn()); pZones.addResistance(UEqn()); -volScalarField rUA = 1.0/UEqn().A(); +volScalarField rAU = 1.0/UEqn().A(); if (momentumPredictor) { - if (oCorr == nOuterCorr-1) - { - solve(UEqn() == -fvc::grad(p), mesh.solver("UFinal")); - } - else - { - solve(UEqn() == -fvc::grad(p)); - } + solve(UEqn() == -fvc::grad(p)); } else { - U = rUA*(UEqn().H() - fvc::grad(p)); + U = rAU*(UEqn().H() - fvc::grad(p)); U.correctBoundaryConditions(); } diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H index b9a86ef995..cc8f6436a1 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/createFields.H @@ -39,9 +39,14 @@ #include "compressibleCreatePhi.H" - dimensionedScalar pMin + dimensionedScalar rhoMax ( - mesh.solutionDict().subDict("PIMPLE").lookup("pMin") + mesh.solutionDict().subDict("PIMPLE").lookup("rhoMax") + ); + + dimensionedScalar rhoMin + ( + mesh.solutionDict().subDict("PIMPLE").lookup("rhoMin") ); Info<< "Creating turbulence model\n" << endl; diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H index c74fb4d84b..590a3c1950 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn().A(); -U = rUA*UEqn().H(); +volScalarField rAU = 1.0/UEqn().A(); +U = rAU*UEqn().H(); if (nCorr <= 1) { @@ -16,7 +16,7 @@ if (transonic) fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); mrfZones.relativeFlux(fvc::interpolate(psi), phid); @@ -27,22 +27,23 @@ if (transonic) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -56,7 +57,7 @@ else fvc::interpolate(rho)* ( (fvc::interpolate(U) & mesh.Sf()) - //+ fvc::ddtPhiCorr(rUA, rho, U, phi) + //+ fvc::ddtPhiCorr(rAU, rho, U, phi) ); mrfZones.relativeFlux(fvc::interpolate(rho), phi); @@ -67,22 +68,23 @@ else ( fvm::ddt(psi, p) + fvc::div(phi) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); - if + pEqn.solve ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } + mesh.solver + ( + p.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); if (nonOrth == nNonOrthCorr) { @@ -100,18 +102,18 @@ else p.relax(); rho = thermo.rho(); + rho = max(rho, rhoMin); + rho = min(rho, rhoMax); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; } -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); -bound(p, pMin); - // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity /* diff --git a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C index 4bae5c1e7b..7f93493f3b 100644 --- a/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousMRFPimpleFoam/rhoPorousMRFPimpleFoam.C @@ -65,17 +65,23 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - if (nOuterCorr != 1) - { - p.storePrevIter(); - rho.storePrevIter(); - } - #include "rhoEqn.H" // --- Pressure-velocity PIMPLE corrector loop for (int oCorr=0; oCorrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } } runTime.write(); diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options index 4f198992b9..a4cdecf368 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/Make/options @@ -11,6 +11,7 @@ EXE_LIBS = \ -lbasicThermophysicalModels \ -lthermalPorousZone \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H index 09b75191db..1a242bdfff 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/createFields.H @@ -45,9 +45,14 @@ scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - dimensionedScalar pMin + dimensionedScalar rhoMax ( - mesh.solutionDict().subDict("SIMPLE").lookup("pMin") + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax") + ); + + dimensionedScalar rhoMin + ( + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin") ); Info<< "Creating turbulence model\n" << endl; @@ -67,6 +72,7 @@ thermalPorousZones pZones(mesh); Switch pressureImplicitPorosity(false); + // nUCorrectors used for pressureImplicitPorosity int nUCorr = 0; if (pZones.size()) { @@ -82,5 +88,11 @@ if (nUCorr > 0) { pressureImplicitPorosity = true; + Info<< "Using pressure implicit porosity" << endl; + } + else + { + Info<< "Using pressure explicit porosity" << endl; } } + diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H index 40b7cb3969..fe69384c8b 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/pEqn.H @@ -58,8 +58,6 @@ else U.correctBoundaryConditions(); -bound(p, pMin); - // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity if (closedVolume) @@ -69,5 +67,7 @@ if (closedVolume) } rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; diff --git a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C index bab9d323bb..5d8ffcb785 100644 --- a/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C +++ b/applications/solvers/compressible/rhoPorousSimpleFoam/rhoPorousSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoSimpleFoam/Make/options b/applications/solvers/compressible/rhoSimpleFoam/Make/options index d51be54abf..700a6a6753 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/Make/options +++ b/applications/solvers/compressible/rhoSimpleFoam/Make/options @@ -8,6 +8,7 @@ EXE_INC = \ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 122280cfac..aa3de6d6fb 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -37,7 +37,7 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" label pRefCell = 0; diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index f43ec6cf62..a082cac880 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -3,8 +3,8 @@ rho = max(rho, rhoMin); rho = min(rho, rhoMax); rho.relax(); -volScalarField rUA = 1.0/UEqn().A(); -U = rUA*UEqn().H(); +volScalarField rAU = 1.0/UEqn().A(); +U = rAU*UEqn().H(); UEqn.clear(); bool closedVolume = false; @@ -22,7 +22,7 @@ if (transonic) fvScalarMatrix pEqn ( fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); // Relax the pressure equation to ensure diagonal-dominance @@ -30,15 +30,7 @@ if (transonic) pEqn.setReference(pRefCell, pRefValue); - // Retain the residual from the first iteration - if (nonOrth == 0) - { - pEqn.solve(); - } - else - { - pEqn.solve(); - } + pEqn.solve(); if (nonOrth == nNonOrthCorr) { @@ -55,20 +47,12 @@ else { fvScalarMatrix pEqn ( - fvm::laplacian(rho*rUA, p) == fvc::div(phi) + fvm::laplacian(rho*rAU, p) == fvc::div(phi) ); pEqn.setReference(pRefCell, pRefValue); - // Retain the residual from the first iteration - if (nonOrth == 0) - { - pEqn.solve(); - } - else - { - pEqn.solve(); - } + pEqn.solve(); if (nonOrth == nNonOrthCorr) { @@ -83,7 +67,7 @@ else // Explicitly relax pressure for momentum corrector p.relax(); -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); // For closed-volume cases adjust the pressure and density levels diff --git a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C index 96eef63121..a8e293c084 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C +++ b/applications/solvers/compressible/rhoSimpleFoam/rhoSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoSimplecFoam/createFields.H b/applications/solvers/compressible/rhoSimplecFoam/createFields.H index d97ee4705b..fab7b70048 100644 --- a/applications/solvers/compressible/rhoSimplecFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimplecFoam/createFields.H @@ -43,9 +43,14 @@ scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - dimensionedScalar pMin + dimensionedScalar rhoMax ( - mesh.solutionDict().subDict("SIMPLE").lookup("pMin") + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax") + ); + + dimensionedScalar rhoMin + ( + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin") ); Info<< "Creating turbulence model\n" << endl; diff --git a/applications/solvers/compressible/rhoSimplecFoam/pEqn.H b/applications/solvers/compressible/rhoSimplecFoam/pEqn.H index a0f17e78bc..43443a507b 100644 --- a/applications/solvers/compressible/rhoSimplecFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimplecFoam/pEqn.H @@ -101,8 +101,6 @@ U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU); U.correctBoundaryConditions(); -bound(p, pMin); - // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity if (closedVolume) @@ -112,6 +110,8 @@ if (closedVolume) } rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); if (!transonic) { diff --git a/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C index 30a5f6fb1a..541e7b388f 100644 --- a/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C +++ b/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/rhoSonicFoam/Make/files b/applications/solvers/compressible/rhoSonicFoam/Make/files deleted file mode 100644 index 96e7916887..0000000000 --- a/applications/solvers/compressible/rhoSonicFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhoSonicFoam.C - -EXE = $(FOAM_APPBIN)/rhoSonicFoam diff --git a/applications/solvers/compressible/rhoSonicFoam/Make/options b/applications/solvers/compressible/rhoSonicFoam/Make/options deleted file mode 100644 index 725122ea1d..0000000000 --- a/applications/solvers/compressible/rhoSonicFoam/Make/options +++ /dev/null @@ -1,4 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -EXE_LIBS = -lfiniteVolume diff --git a/applications/solvers/compressible/rhoSonicFoam/compressibleContinuityErrs.H b/applications/solvers/compressible/rhoSonicFoam/compressibleContinuityErrs.H deleted file mode 100644 index 128d99c946..0000000000 --- a/applications/solvers/compressible/rhoSonicFoam/compressibleContinuityErrs.H +++ /dev/null @@ -1,12 +0,0 @@ -{ -# include "rhoEqn.H" -} -{ - scalar sumLocalContErr = (sum(mag(rho - psi*p))/sum(rho)).value(); - scalar globalContErr = (sum(rho - psi*p)/sum(rho)).value(); - cumulativeContErr += globalContErr; - - Info<< "time step continuity errors : sum local = " << sumLocalContErr - << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr << endl; -} diff --git a/applications/solvers/compressible/rhoSonicFoam/createFields.H b/applications/solvers/compressible/rhoSonicFoam/createFields.H deleted file mode 100644 index f0c0e4a22a..0000000000 --- a/applications/solvers/compressible/rhoSonicFoam/createFields.H +++ /dev/null @@ -1,96 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - - Info<< "Reading field T\n" << endl; - volScalarField T - ( - IOobject - ( - "T", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - - volScalarField psi - ( - IOobject - ( - "psi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - 1.0/(R*T) - ); - psi.oldTime(); - - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh - ), - psi*p, - p.boundaryField().types() - ); - - volVectorField rhoU - ( - IOobject - ( - "rhoU", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho*U, - U.boundaryField().types() - ); - - volScalarField rhoE - ( - IOobject - ( - "rhoE", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - rho*Cv*T + 0.5*rho*magSqr(rhoU/rho), - T.boundaryField().types() - ); diff --git a/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H b/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H deleted file mode 100644 index 1fc57fc5fd..0000000000 --- a/applications/solvers/compressible/rhoSonicFoam/readThermodynamicProperties.H +++ /dev/null @@ -1,23 +0,0 @@ - Info<< "Reading thermodynamicProperties\n" << endl; - - IOdictionary thermodynamicProperties - ( - IOobject - ( - "thermodynamicProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar R - ( - thermodynamicProperties.lookup("R") - ); - - dimensionedScalar Cv - ( - thermodynamicProperties.lookup("Cv") - ); diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/Make/files b/applications/solvers/compressible/rhopSonicFoam/BCs/Make/files deleted file mode 100644 index 3931413eae..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/Make/files +++ /dev/null @@ -1,8 +0,0 @@ -rho/fixedRhoFvPatchScalarField.C -rho/gradientRhoFvPatchScalarField.C -rhoE/fixedRhoEFvPatchScalarField.C -rhoE/mixedRhoEFvPatchScalarField.C -rhoU/fixedRhoUFvPatchVectorField.C -p/inviscidWallPFvPatchScalarField.C - -LIB = $(FOAM_LIBBIN)/librhopSonicFoam diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/Make/options b/applications/solvers/compressible/rhopSonicFoam/BCs/Make/options deleted file mode 100644 index 9c87caea6e..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/Make/options +++ /dev/null @@ -1,6 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude - -LIB_LIBS = \ - -lfiniteVolume \ - -L$(FOAM_LIBBIN) diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/rho/fixedRhoFvPatchScalarField.C b/applications/solvers/compressible/rhopSonicFoam/BCs/rho/fixedRhoFvPatchScalarField.C deleted file mode 100644 index 9704f8acab..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/rho/fixedRhoFvPatchScalarField.C +++ /dev/null @@ -1,126 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "fixedRhoFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField -( - const fixedRhoFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper) -{} - - -fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField -( - const fixedRhoFvPatchScalarField& tppsf -) -: - fixedValueFvPatchScalarField(tppsf) -{} - - -fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField -( - const fixedRhoFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void fixedRhoFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchField& psip = - patch().lookupPatchField("psi"); - - const fvPatchField& pp = - patch().lookupPatchField("p"); - - operator==(psip*pp); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -void fixedRhoFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchScalarField, fixedRhoFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/rho/gradientRhoFvPatchScalarField.C b/applications/solvers/compressible/rhopSonicFoam/BCs/rho/gradientRhoFvPatchScalarField.C deleted file mode 100644 index ed0c9f075d..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/rho/gradientRhoFvPatchScalarField.C +++ /dev/null @@ -1,139 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "gradientRhoFvPatchScalarField.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -gradientRhoFvPatchScalarField::gradientRhoFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedGradientFvPatchScalarField(p, iF) -{} - - -gradientRhoFvPatchScalarField::gradientRhoFvPatchScalarField -( - const gradientRhoFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedGradientFvPatchScalarField(ptf, p, iF, mapper) -{} - - -gradientRhoFvPatchScalarField::gradientRhoFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedGradientFvPatchScalarField(p, iF) -{ - if (dict.found("gradient")) - { - gradient() = scalarField("gradient", dict, p.size()); - fixedGradientFvPatchScalarField::updateCoeffs(); - fixedGradientFvPatchScalarField::evaluate(); - } - else - { - fvPatchField::operator=(patchInternalField()); - gradient() = 0.0; - } -} - - -gradientRhoFvPatchScalarField::gradientRhoFvPatchScalarField -( - const gradientRhoFvPatchScalarField& wbppsf -) -: - fixedGradientFvPatchScalarField(wbppsf) -{} - - -gradientRhoFvPatchScalarField::gradientRhoFvPatchScalarField -( - const gradientRhoFvPatchScalarField& wbppsf, - const DimensionedField& iF -) -: - fixedGradientFvPatchScalarField(wbppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void gradientRhoFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchField& psip = - patch().lookupPatchField("psi"); - - const fvPatchField& pp = - patch().lookupPatchField("p"); - - gradient() = psip*pp.snGrad() + psip.snGrad()*pp; - - fixedGradientFvPatchScalarField::updateCoeffs(); -} - - -void gradientRhoFvPatchScalarField::write(Ostream& os) const -{ - fixedGradientFvPatchScalarField::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchScalarField, gradientRhoFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/rhoE/fixedRhoEFvPatchScalarField.C b/applications/solvers/compressible/rhopSonicFoam/BCs/rhoE/fixedRhoEFvPatchScalarField.C deleted file mode 100644 index dc2fd0e4d1..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/rhoE/fixedRhoEFvPatchScalarField.C +++ /dev/null @@ -1,136 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "fixedRhoEFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -fixedRhoEFvPatchScalarField::fixedRhoEFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -fixedRhoEFvPatchScalarField::fixedRhoEFvPatchScalarField -( - const fixedRhoEFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchScalarField(ptf, p, iF, mapper) -{} - - -fixedRhoEFvPatchScalarField::fixedRhoEFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchScalarField(p, iF) -{} - - -fixedRhoEFvPatchScalarField::fixedRhoEFvPatchScalarField -( - const fixedRhoEFvPatchScalarField& tppsf -) -: - fixedValueFvPatchScalarField(tppsf) -{} - - -fixedRhoEFvPatchScalarField::fixedRhoEFvPatchScalarField -( - const fixedRhoEFvPatchScalarField& tppsf, - const DimensionedField& iF -) -: - fixedValueFvPatchScalarField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void fixedRhoEFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const dictionary& thermodynamicProperties = db().lookupObject - ( - "thermodynamicProperties" - ); - - dimensionedScalar Cv(thermodynamicProperties.lookup("Cv")); - - const fvPatchScalarField& rhop = - patch().lookupPatchField("rho"); - - const fvPatchVectorField& rhoUp = - patch().lookupPatchField("rhoU"); - - const fvPatchScalarField& Tp = - patch().lookupPatchField("T"); - - operator==(rhop*(Cv.value()*Tp + 0.5*magSqr(rhoUp/rhop))); - - fixedValueFvPatchScalarField::updateCoeffs(); -} - - -void fixedRhoEFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchScalarField, fixedRhoEFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/rhoE/mixedRhoEFvPatchScalarField.C b/applications/solvers/compressible/rhopSonicFoam/BCs/rhoE/mixedRhoEFvPatchScalarField.C deleted file mode 100644 index b23a309362..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/rhoE/mixedRhoEFvPatchScalarField.C +++ /dev/null @@ -1,194 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "mixedRhoEFvPatchScalarField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -mixedRhoEFvPatchScalarField::mixedRhoEFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF -) -: - mixedFvPatchScalarField(p, iF) -{ - refValue() = 0.0; - refGrad() = 0.0; - valueFraction() = 0.0; -} - - -mixedRhoEFvPatchScalarField::mixedRhoEFvPatchScalarField -( - const mixedRhoEFvPatchScalarField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - mixedFvPatchScalarField(ptf, p, iF, mapper) -{} - - -mixedRhoEFvPatchScalarField::mixedRhoEFvPatchScalarField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - mixedFvPatchScalarField(p, iF) -{ - if (dict.found("value")) - { - fvPatchField::operator= - ( - scalarField("value", dict, p.size()) - ); - } - else - { - fvPatchField::operator=(patchInternalField()); - } - - refValue() = *this; - refGrad() = 0.0; - valueFraction() = 0.0; -} - - -mixedRhoEFvPatchScalarField::mixedRhoEFvPatchScalarField -( - const mixedRhoEFvPatchScalarField& ptpsf -) -: - mixedFvPatchScalarField(ptpsf) -{} - - -mixedRhoEFvPatchScalarField::mixedRhoEFvPatchScalarField -( - const mixedRhoEFvPatchScalarField& ptpsf, - const DimensionedField& iF -) -: - mixedFvPatchScalarField(ptpsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void mixedRhoEFvPatchScalarField::autoMap -( - const fvPatchFieldMapper& m -) -{ - mixedFvPatchScalarField::autoMap(m); -} - - -void mixedRhoEFvPatchScalarField::rmap -( - const fvPatchField& ptf, - const labelList& addr -) -{ - mixedFvPatchField::rmap(ptf, addr); -} - - -void mixedRhoEFvPatchScalarField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchField& rhop = - patch().lookupPatchField("rho"); - const fvPatchField& rhoUp = - patch().lookupPatchField("rhoU"); -// fvPatchField& Tp = -// patch().lookupPatchField("T"); - - const volScalarField& T = db().lookupObject("T"); - const label patchi = patch().index(); - fvPatchScalarField& Tp = - const_cast(T.boundaryField()[patchi]); - - Tp.evaluate(); - - const dictionary& thermodynamicProperties = db().lookupObject - ( - "thermodynamicProperties" - ); - - dimensionedScalar Cv(thermodynamicProperties.lookup("Cv")); - - valueFraction() = rhop.snGrad()/ - (rhop.snGrad() - rhop*this->patch().deltaCoeffs()); - - refValue() = 0.5*rhop*magSqr(rhoUp/rhop); - refGrad() = - rhop*Cv.value()*Tp.snGrad() - + ( - refValue() - - (0.5*rhop.patchInternalField()* - magSqr(rhoUp.patchInternalField()/rhop.patchInternalField())) - )*patch().deltaCoeffs(); - - mixedFvPatchScalarField::updateCoeffs(); -} - - -void mixedRhoEFvPatchScalarField::write(Ostream& os) const -{ - fvPatchScalarField::write(os); - os.writeKeyword("valueFraction") << valueFraction() - << token::END_STATEMENT << endl; - os.writeKeyword("refValue") << refValue() << token::END_STATEMENT << endl; - os.writeKeyword("refGrad") << refGrad() << token::END_STATEMENT << endl; - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchScalarField, mixedRhoEFvPatchScalarField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhopSonicFoam/BCs/rhoU/fixedRhoUFvPatchVectorField.C b/applications/solvers/compressible/rhopSonicFoam/BCs/rhoU/fixedRhoUFvPatchVectorField.C deleted file mode 100644 index 411f078d57..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/BCs/rhoU/fixedRhoUFvPatchVectorField.C +++ /dev/null @@ -1,126 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "fixedRhoUFvPatchVectorField.H" -#include "addToRunTimeSelectionTable.H" -#include "fvPatchFieldMapper.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -fixedRhoUFvPatchVectorField::fixedRhoUFvPatchVectorField -( - const fvPatch& p, - const DimensionedField& iF -) -: - fixedValueFvPatchVectorField(p, iF) -{} - - -fixedRhoUFvPatchVectorField::fixedRhoUFvPatchVectorField -( - const fixedRhoUFvPatchVectorField& ptf, - const fvPatch& p, - const DimensionedField& iF, - const fvPatchFieldMapper& mapper -) -: - fixedValueFvPatchVectorField(ptf, p, iF, mapper) -{} - - -fixedRhoUFvPatchVectorField::fixedRhoUFvPatchVectorField -( - const fvPatch& p, - const DimensionedField& iF, - const dictionary& dict -) -: - fixedValueFvPatchVectorField(p, iF) -{} - - -fixedRhoUFvPatchVectorField::fixedRhoUFvPatchVectorField -( - const fixedRhoUFvPatchVectorField& tppsf -) -: - fixedValueFvPatchVectorField(tppsf) -{} - - -fixedRhoUFvPatchVectorField::fixedRhoUFvPatchVectorField -( - const fixedRhoUFvPatchVectorField& tppsf, - const DimensionedField& iF -) -: - fixedValueFvPatchVectorField(tppsf, iF) -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void fixedRhoUFvPatchVectorField::updateCoeffs() -{ - if (updated()) - { - return; - } - - const fvPatchScalarField& rhop = - patch().lookupPatchField("rho"); - - const fvPatchVectorField& Up = - patch().lookupPatchField("U"); - - operator==(rhop*Up); - - fixedValueFvPatchVectorField::updateCoeffs(); -} - - -void fixedRhoUFvPatchVectorField::write(Ostream& os) const -{ - fvPatchVectorField::write(os); - writeEntry("value", os); -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -makePatchTypeField(fvPatchVectorField, fixedRhoUFvPatchVectorField); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/applications/solvers/compressible/rhopSonicFoam/Make/files b/applications/solvers/compressible/rhopSonicFoam/Make/files deleted file mode 100644 index e751786c41..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -rhopSonicFoam.C - -EXE = $(FOAM_APPBIN)/rhopSonicFoam diff --git a/applications/solvers/compressible/rhopSonicFoam/Make/options b/applications/solvers/compressible/rhopSonicFoam/Make/options deleted file mode 100644 index 31374b9af4..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/Make/options +++ /dev/null @@ -1,7 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -IBCs/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lrhopSonicFoam diff --git a/applications/solvers/compressible/rhopSonicFoam/boundaryTypes.H b/applications/solvers/compressible/rhopSonicFoam/boundaryTypes.H deleted file mode 100644 index 7d314cd110..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/boundaryTypes.H +++ /dev/null @@ -1,7 +0,0 @@ -#include "fixedGradientFvPatchFields.H" -#include "zeroGradientFvPatchFields.H" -#include "fixedRhoFvPatchScalarField.H" -#include "gradientRhoFvPatchScalarField.H" -#include "fixedRhoEFvPatchScalarField.H" -#include "mixedRhoEFvPatchScalarField.H" -#include "fixedRhoUFvPatchVectorField.H" diff --git a/applications/solvers/compressible/rhopSonicFoam/compressibleCreatePhi.H b/applications/solvers/compressible/rhopSonicFoam/compressibleCreatePhi.H deleted file mode 100644 index 262ceebc05..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/compressibleCreatePhi.H +++ /dev/null @@ -1,54 +0,0 @@ - IOobject phiHeader - ( - "phi", - runTime.timeName(), - mesh, - IOobject::NO_READ - ); - - - surfaceScalarField* phiPtr; - - if (phiHeader.headerOk()) - { - Info<< "Reading face flux field phi\n" << endl; - - phiPtr = new surfaceScalarField - ( - IOobject - ( - "phi", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - } - else - { - Info<< "Calculating face flux field phi\n" << endl; - - wordList phiTypes - ( - rhoU.boundaryField().size(), - calculatedFvPatchScalarField::typeName - ); - - phiPtr = new surfaceScalarField - ( - IOobject - ( - "phi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - linearInterpolate(rhoU) & mesh.Sf(), - phiTypes - ); - } - - surfaceScalarField& phi = *phiPtr; diff --git a/applications/solvers/compressible/rhopSonicFoam/createFields.H b/applications/solvers/compressible/rhopSonicFoam/createFields.H deleted file mode 100644 index fed8432711..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/createFields.H +++ /dev/null @@ -1,129 +0,0 @@ - Info<< "Reading field p\n" << endl; - volScalarField p - ( - IOobject - ( - "p", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - p.oldTime(); - - Info<< "Reading field T\n" << endl; - volScalarField T - ( - IOobject - ( - "T", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - T.correctBoundaryConditions(); - - volScalarField psi - ( - IOobject - ( - "psi", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - 1.0/(R*T) - ); - psi.oldTime(); - -# include "rhoBoundaryTypes.H" - volScalarField rho - ( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - p*psi, - rhoBoundaryTypes - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "rhoUboundaryTypes.H" - volVectorField rhoU - ( - IOobject - ( - "rhoU", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - rho*U, - rhoUboundaryTypes - ); - -# include "rhoEboundaryTypes.H" - volScalarField rhoE - ( - IOobject - ( - "rhoE", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - rho*Cv*T + 0.5*rho*magSqr(rhoU/rho), - rhoEboundaryTypes - ); - -# include "compressibleCreatePhi.H" - phi.oldTime(); - - surfaceScalarField phiv - ( - IOobject - ( - "phiv", - runTime.timeName(), - mesh - ), - phi/linearInterpolate(rho), - phi.boundaryField().types() - ); - - rhoU.correctBoundaryConditions(); - - multivariateSurfaceInterpolationScheme::fieldTable fields; - - volScalarField magRhoU = mag(rhoU); - volScalarField H("H", (rhoE + p)/rho); - - fields.add(rho); - fields.add(magRhoU); - fields.add(H); - diff --git a/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H b/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H deleted file mode 100644 index 3b8c82c8e5..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/readThermodynamicProperties.H +++ /dev/null @@ -1,33 +0,0 @@ - Info<< "Reading thermodynamicProperties\n" << endl; - - IOdictionary thermodynamicProperties - ( - IOobject - ( - "thermodynamicProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar R - ( - thermodynamicProperties.lookup("R") - ); - - dimensionedScalar Cv - ( - thermodynamicProperties.lookup("Cv") - ); - - dimensionedScalar Cp = Cv + R; - - dimensionedScalar gamma = Cp/Cv; - - dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0); - if (thermodynamicProperties.found("Pr")) - { - Pr = thermodynamicProperties.lookup("Pr"); - } diff --git a/applications/solvers/compressible/rhopSonicFoam/resetPhiPatches.H b/applications/solvers/compressible/rhopSonicFoam/resetPhiPatches.H deleted file mode 100644 index c8541406f3..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/resetPhiPatches.H +++ /dev/null @@ -1,14 +0,0 @@ -surfaceScalarField::GeometricBoundaryField& phiPatches = phi.boundaryField(); -const volVectorField::GeometricBoundaryField& rhoUpatches = rhoU.boundaryField(); -const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phiPatches, patchI) -{ - if (phi.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phiPatch = - refCast(phiPatches[patchI]); - - phiPatch == (rhoUpatches[patchI] & SfPatches[patchI]); - } -} diff --git a/applications/solvers/compressible/rhopSonicFoam/rhoBoundaryTypes.H b/applications/solvers/compressible/rhopSonicFoam/rhoBoundaryTypes.H deleted file mode 100644 index f54d066311..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/rhoBoundaryTypes.H +++ /dev/null @@ -1,21 +0,0 @@ -const volScalarField::GeometricBoundaryField& pbf = p.boundaryField(); -wordList rhoBoundaryTypes = pbf.types(); - -forAll(rhoBoundaryTypes, patchi) -{ - if - ( - rhoBoundaryTypes[patchi] == "pressureTransmissive" - ) - { - rhoBoundaryTypes[patchi] = zeroGradientFvPatchScalarField::typeName; - } - else if (pbf[patchi].fixesValue()) - { - rhoBoundaryTypes[patchi] = fixedRhoFvPatchScalarField::typeName; - } - else - { - rhoBoundaryTypes[patchi] = gradientRhoFvPatchScalarField::typeName; - } -} diff --git a/applications/solvers/compressible/rhopSonicFoam/rhoEboundaryTypes.H b/applications/solvers/compressible/rhopSonicFoam/rhoEboundaryTypes.H deleted file mode 100644 index 84e08b29ed..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/rhoEboundaryTypes.H +++ /dev/null @@ -1,14 +0,0 @@ -const volScalarField::GeometricBoundaryField& Tbf = T.boundaryField(); -wordList rhoEboundaryTypes = Tbf.types(); - -forAll(rhoEboundaryTypes, patchi) -{ - if (Tbf[patchi].fixesValue()) - { - rhoEboundaryTypes[patchi] = fixedRhoEFvPatchScalarField::typeName; - } - else - { - rhoEboundaryTypes[patchi] = mixedRhoEFvPatchScalarField::typeName; - } -} diff --git a/applications/solvers/compressible/rhopSonicFoam/rhoUboundaryTypes.H b/applications/solvers/compressible/rhopSonicFoam/rhoUboundaryTypes.H deleted file mode 100644 index c03b959d26..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/rhoUboundaryTypes.H +++ /dev/null @@ -1,10 +0,0 @@ -const volVectorField::GeometricBoundaryField& Ubf = U.boundaryField(); -wordList rhoUboundaryTypes = Ubf.types(); - -forAll(rhoUboundaryTypes, patchi) -{ - if (Ubf[patchi].fixesValue()) - { - rhoUboundaryTypes[patchi] = fixedRhoUFvPatchVectorField::typeName; - } -} diff --git a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C deleted file mode 100644 index d3a982dbb3..0000000000 --- a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C +++ /dev/null @@ -1,191 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - rhopSonicFoam - -Description - Pressure-density-based compressible flow solver. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "weighted.H" -#include "gaussConvectionScheme.H" -#include "multivariateGaussConvectionScheme.H" -#include "MUSCL.H" -#include "LimitedScheme.H" -#include "boundaryTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readThermodynamicProperties.H" - #include "createFields.H" - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.loop()) - { - Info<< "Time = " << runTime.value() << nl << endl; - - #include "readPISOControls.H" - scalar HbyAblend = readScalar(piso.lookup("HbyAblend")); - - #include "readTimeControls.H" - - scalar CoNum = max - ( - mesh.surfaceInterpolation::deltaCoeffs() - *mag(phiv)/mesh.magSf() - ).value()*runTime.deltaTValue(); - - Info<< "Max Courant Number = " << CoNum << endl; - - #include "setDeltaT.H" - - for (int outerCorr=0; outerCorr mvConvection - ( - mesh, - fields, - phiv, - mesh.divScheme("div(phiv,rhoUH)") - ); - - solve - ( - fvm::ddt(rho) - + mvConvection.fvmDiv(phiv, rho) - ); - - surfaceScalarField rhoUWeights = - mvConvection.interpolationScheme()()(magRhoU)() - .weights(magRhoU); - - weighted rhoUScheme(rhoUWeights); - - fvVectorMatrix rhoUEqn - ( - fvm::ddt(rhoU) - + fv::gaussConvectionScheme(mesh, phiv, rhoUScheme) - .fvmDiv(phiv, rhoU) - ); - - solve(rhoUEqn == -fvc::grad(p)); - - solve - ( - fvm::ddt(rhoE) - + mvConvection.fvmDiv(phiv, rhoE) - == - - mvConvection.fvcDiv(phiv, p) - ); - - T = (rhoE - 0.5*rho*magSqr(rhoU/rho))/Cv/rho; - psi = 1.0/(R*T); - p = rho/psi; - - for (int corr=0; corr, limitFuncs::magSqr> - (mesh, phi, IStringStream("HbyA")()).weights(HbyA); - - phi = - ( - surfaceInterpolationScheme::interpolate - (HbyA, HbyAWeights) & mesh.Sf() - ) - + HbyAblend*fvc::ddtPhiCorr(rrhoUA, rho, rhoU, phi); - - p.boundaryField().updateCoeffs(); - - surfaceScalarField phiGradp = - rrhoUAf*mesh.magSf()*fvc::snGrad(p); - - phi -= phiGradp; - - #include "resetPhiPatches.H" - - surfaceScalarField rhof = - mvConvection.interpolationScheme()()(rho)() - .interpolate(rho); - - phiv = phi/rhof; - - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - + mvConvection.fvcDiv(phiv, rho) - + fvc::div(phiGradp) - - fvm::laplacian(rrhoUAf, p) - ); - - pEqn.solve(); - - phi += phiGradp + pEqn.flux(); - rho = psi*p; - rhof = - mvConvection.interpolationScheme()()(rho)() - .interpolate(rho); - phiv = phi/rhof; - - rhoU = HbyA - rrhoUA*fvc::grad(p); - rhoU.correctBoundaryConditions(); - } - } - - U = rhoU/rho; - - runTime.write(); - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/compressible/sonicDyMFoam/Make/options b/applications/solvers/compressible/sonicDyMFoam/Make/options index f05f52d427..81495fb1f6 100644 --- a/applications/solvers/compressible/sonicDyMFoam/Make/options +++ b/applications/solvers/compressible/sonicDyMFoam/Make/options @@ -9,6 +9,7 @@ EXE_INC = \ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H b/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H index 1fc57fc5fd..4e19adaae4 100644 --- a/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/sonicDyMFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H b/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H index 1502e2033a..c30f65b445 100644 --- a/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H +++ b/applications/solvers/compressible/sonicDyMFoam/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C index 312952bcbf..578d6699ed 100644 --- a/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C +++ b/applications/solvers/compressible/sonicDyMFoam/sonicDyMFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/sonicFoam/Make/options b/applications/solvers/compressible/sonicFoam/Make/options index ecfde60eee..a5b9436ac6 100644 --- a/applications/solvers/compressible/sonicFoam/Make/options +++ b/applications/solvers/compressible/sonicFoam/Make/options @@ -6,6 +6,7 @@ EXE_INC = \ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume \ diff --git a/applications/solvers/compressible/sonicFoam/pEqn.H b/applications/solvers/compressible/sonicFoam/pEqn.H index 96a500d4c2..8d6040b530 100644 --- a/applications/solvers/compressible/sonicFoam/pEqn.H +++ b/applications/solvers/compressible/sonicFoam/pEqn.H @@ -1,7 +1,7 @@ rho = thermo.rho(); -volScalarField rUA = 1.0/UEqn.A(); -U = rUA*UEqn.H(); +volScalarField rAU = 1.0/UEqn.A(); +U = rAU*UEqn.H(); surfaceScalarField phid ( @@ -9,7 +9,7 @@ surfaceScalarField phid fvc::interpolate(psi) *( (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ) ); @@ -19,7 +19,7 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) ( fvm::ddt(psi, p) + fvm::div(phid, p) - - fvm::laplacian(rho*rUA, p) + - fvm::laplacian(rho*rAU, p) ); pEqn.solve(); @@ -33,5 +33,5 @@ for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) #include "rhoEqn.H" #include "compressibleContinuityErrs.H" -U -= rUA*fvc::grad(p); +U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); diff --git a/applications/solvers/compressible/sonicFoam/sonicFoam.C b/applications/solvers/compressible/sonicFoam/sonicFoam.C index fc51e17f50..f8f489ca42 100644 --- a/applications/solvers/compressible/sonicFoam/sonicFoam.C +++ b/applications/solvers/compressible/sonicFoam/sonicFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H b/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H index d8dad7d800..82f3655f46 100644 --- a/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H +++ b/applications/solvers/compressible/sonicLiquidFoam/readThermodynamicProperties.H @@ -7,7 +7,7 @@ "thermodynamicProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H b/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H index 1502e2033a..c30f65b445 100644 --- a/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H +++ b/applications/solvers/compressible/sonicLiquidFoam/readTransportProperties.H @@ -7,7 +7,7 @@ "transportProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C b/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C index f188a25cc7..c92f3d82f9 100644 --- a/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C +++ b/applications/solvers/compressible/sonicLiquidFoam/sonicLiquidFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,8 +71,8 @@ int main(int argc, char *argv[]) for (int corr=0; corr("nCorrectors", 1); -int nBcorr(readInt(Bpiso.lookup("nCorrectors"))); diff --git a/applications/solvers/financial/financialFoam/createFields.H b/applications/solvers/financial/financialFoam/createFields.H index 6cdbbe2bde..dc0da4d2a3 100644 --- a/applications/solvers/financial/financialFoam/createFields.H +++ b/applications/solvers/financial/financialFoam/createFields.H @@ -7,7 +7,7 @@ "financialProperties", runTime.constant(), mesh, - IOobject::MUST_READ, + IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); diff --git a/applications/solvers/financial/financialFoam/financialFoam.C b/applications/solvers/financial/financialFoam/financialFoam.C index c9064e8cdc..5f3d0e5b40 100644 --- a/applications/solvers/financial/financialFoam/financialFoam.C +++ b/applications/solvers/financial/financialFoam/financialFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files new file mode 100644 index 0000000000..19c4661a3c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantBoussinesqPimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantBoussinesqPimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options similarity index 91% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options index 041d2e0605..cadaf0850d 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options @@ -9,5 +9,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ + -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleTransportModels diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H new file mode 100644 index 0000000000..9a835792a4 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H @@ -0,0 +1,18 @@ +{ + kappat = turbulence->nut()/Prt; + kappat.correctBoundaryConditions(); + + volScalarField kappaEff("kappaEff", turbulence->nu()/Pr + kappat); + + fvScalarMatrix TEqn + ( + fvm::ddt(T) + + fvm::div(phi, T) + - fvm::laplacian(kappaEff, T) + ); + + TEqn.relax(); + TEqn.solve(mesh.solver(T.select(finalIter))); + + rhok = 1.0 - beta*(T - TRef); +} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H similarity index 66% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H index 35387f4ff4..20a05e5cd4 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H @@ -18,9 +18,10 @@ fvc::reconstruct ( ( - fvc::interpolate(rhok)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - ) + - ghf*fvc::snGrad(rhok) + - fvc::snGrad(p_rgh) + )*mesh.magSf() + ), + mesh.solver(U.select(finalIter)) ); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C similarity index 76% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 0269b95c90..54519906a4 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/buoyantBoussinesqPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Application - buoyantBoussinesqPisoFoam + buoyantBoussinesqPimpleFoam Description Transient solver for buoyant, turbulent flow of incompressible fluids @@ -72,20 +72,40 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; #include "readTimeControls.H" - #include "readPISOControls.H" + #include "readPIMPLEControls.H" #include "CourantNo.H" #include "setDeltaT.H" - #include "UEqn.H" - #include "TEqn.H" - - // --- PISO loop - for (int corr=0; corrcorrect(); + if (nOuterCorr != 1) + { + p_rgh.storePrevIter(); + } + + #include "UEqn.H" + #include "TEqn.H" + + // --- PISO loop + for (int corr=0; corrcorrect(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } + } runTime.write(); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H similarity index 55% rename from applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H index dde0e38b33..342af079d8 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/createFields.H @@ -14,12 +14,12 @@ mesh ); - Info<< "Reading field p\n" << endl; - volScalarField p + Info<< "Reading field p_rgh\n" << endl; + volScalarField p_rgh ( IOobject ( - "p", + "p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -42,9 +42,9 @@ mesh ); -# include "createPhi.H" + #include "createPhi.H" -# include "readTransportProperties.H" + #include "readTransportProperties.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -52,17 +52,6 @@ incompressible::RASModel::New(U, phi, laminarTransport) ); - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - mesh.solutionDict().subDict("PISO"), - pRefCell, - pRefValue - ); - - // Kinematic density for buoyancy force volScalarField rhok ( @@ -74,3 +63,57 @@ ), 1.0 - beta*(T - TRef) ); + + // kinematic turbulent thermal thermal conductivity m2/s + Info<< "Reading field kappat\n" << endl; + volScalarField kappat + ( + IOobject + ( + "kappat", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); + + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p_rgh + rhok*gh + ); + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell + ( + p, + p_rgh, + mesh.solutionDict().subDict("PIMPLE"), + pRefCell, + pRefValue + ); + + if (p_rgh.needReference()) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + } + diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H new file mode 100644 index 0000000000..1e972269ff --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H @@ -0,0 +1,66 @@ +{ + volScalarField rAU("rAU", 1.0/UEqn.A()); + surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU)); + + U = rAU*UEqn.H(); + + phi = (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rAU, U, phi); + + surfaceScalarField buoyancyPhi = rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf(); + phi -= buoyancyPhi; + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix p_rghEqn + ( + fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) + ); + + p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); + + p_rghEqn.solve + ( + mesh.solver + ( + p_rgh.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); + + if (nonOrth == nNonOrthCorr) + { + // Calculate the conservative fluxes + phi -= p_rghEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p_rgh.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rAUf); + U.correctBoundaryConditions(); + } + } + + #include "continuityErrs.H" + + p = p_rgh + rhok*gh; + + if (p_rgh.needReference()) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + p_rgh = p - rhok*gh; + } +} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files deleted file mode 100644 index d7b85221d8..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantBoussinesqPisoFoam.C - -EXE = $(FOAM_APPBIN)/buoyantBoussinesqPisoFoam diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H deleted file mode 100644 index ece4b8ffe5..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/TEqn.H +++ /dev/null @@ -1,20 +0,0 @@ -{ - volScalarField kappaEff - ( - "kappaEff", - turbulence->nu()/Pr + turbulence->nut()/Prt - ); - - fvScalarMatrix TEqn - ( - fvm::ddt(T) - + fvm::div(phi, T) - - fvm::laplacian(kappaEff, T) - ); - - TEqn.relax(); - - TEqn.solve(); - - rhok = 1.0 - beta*(T - TRef); -} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H deleted file mode 100644 index ff0c26f058..0000000000 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam/pEqn.H +++ /dev/null @@ -1,41 +0,0 @@ -{ - volScalarField rUA("rUA", 1.0/UEqn.A()); - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); - - U = rUA*UEqn.H(); - - surfaceScalarField phiU - ( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, U, phi) - ); - - phi = phiU + rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::laplacian(rUAf, p) == fvc::div(phi) - ); - - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi -= pEqn.flux(); - } - } - - U += rUA*fvc::reconstruct((phi - phiU)/rUAf); - U.correctBoundaryConditions(); - - #include "continuityErrs.H" -} diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options index a53061a93c..6905967f04 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options @@ -8,5 +8,6 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ -lmeshTools \ + -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleTransportModels diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index 3bdeea0452..180a33d918 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -1,9 +1,8 @@ { - volScalarField kappaEff - ( - "kappaEff", - turbulence->nu()/Pr + turbulence->nut()/Prt - ); + kappat = turbulence->nut()/Prt; + kappat.correctBoundaryConditions(); + + volScalarField kappaEff("kappaEff", turbulence->nu()/Pr + kappat); fvScalarMatrix TEqn ( @@ -13,7 +12,6 @@ ); TEqn.relax(); - TEqn.solve(); rhok = 1.0 - beta*(T - TRef); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index 292f44b4bd..9a53619af5 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -8,15 +8,18 @@ UEqn().relax(); - solve - ( - UEqn() - == - fvc::reconstruct + if (momentumPredictor) + { + solve ( + UEqn() + == + fvc::reconstruct ( - fvc::interpolate(rhok)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() + ( + - ghf*fvc::snGrad(rhok) + - fvc::snGrad(p_rgh) + )*mesh.magSf() ) - ) - ); + ); + } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index f10d18c512..1a5086e130 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) #include "readSIMPLEControls.H" - p.storePrevIter(); + p_rgh.storePrevIter(); // Pressure-velocity SIMPLE corrector { diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H index 0e668e9d98..477a322833 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/createFields.H @@ -14,12 +14,12 @@ mesh ); - Info<< "Reading field p\n" << endl; - volScalarField p + Info<< "Reading field p_rgh\n" << endl; + volScalarField p_rgh ( IOobject ( - "p", + "p_rgh", runTime.timeName(), mesh, IOobject::MUST_READ, @@ -42,9 +42,9 @@ mesh ); -# include "createPhi.H" + #include "createPhi.H" -# include "readTransportProperties.H" + #include "readTransportProperties.H" Info<< "Creating turbulence model\n" << endl; autoPtr turbulence @@ -52,20 +52,6 @@ incompressible::RASModel::New(U, phi, laminarTransport) ); - Info<< "Calculating field beta*(g.h)\n" << endl; - surfaceScalarField betaghf("betagh", beta*(g & mesh.Cf())); - - label pRefCell = 0; - scalar pRefValue = 0.0; - setRefCell - ( - p, - mesh.solutionDict().subDict("SIMPLE"), - pRefCell, - pRefValue - ); - - // Kinematic density for buoyancy force volScalarField rhok ( @@ -77,3 +63,56 @@ ), 1.0 - beta*(T - TRef) ); + + // kinematic turbulent thermal thermal conductivity m2/s + Info<< "Reading field kappat\n" << endl; + volScalarField kappat + ( + IOobject + ( + "kappat", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); + + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + p_rgh + rhok*gh + ); + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell + ( + p, + p_rgh, + mesh.solutionDict().subDict("SIMPLE"), + pRefCell, + pRefValue + ); + + if (p_rgh.needReference()) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H index 9b23330944..daa7867fd5 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H @@ -1,50 +1,54 @@ { - volScalarField rUA("rUA", 1.0/UEqn().A()); - surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA)); + volScalarField rAU("rAU", 1.0/UEqn().A()); + surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU)); - U = rUA*UEqn().H(); + U = rAU*UEqn().H(); UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); - adjustPhi(phi, U, p); + adjustPhi(phi, U, p_rgh); - surfaceScalarField buoyancyPhi = - rUAf*fvc::interpolate(rhok)*(g & mesh.Sf()); - phi += buoyancyPhi; + surfaceScalarField buoyancyPhi = rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf(); + phi -= buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pEqn + fvScalarMatrix p_rghEqn ( - fvm::laplacian(rUAf, p) == fvc::div(phi) + fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) ); - pEqn.setReference(pRefCell, pRefValue); + p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); - // retain the residual from the first iteration - if (nonOrth == 0) - { - pEqn.solve(); - } - else - { - pEqn.solve(); - } + p_rghEqn.solve(); if (nonOrth == nNonOrthCorr) { // Calculate the conservative fluxes - phi -= pEqn.flux(); + phi -= p_rghEqn.flux(); // Explicitly relax pressure for momentum corrector - p.relax(); + p_rgh.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rUAf); + U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rAUf); U.correctBoundaryConditions(); } } #include "continuityErrs.H" + + p = p_rgh + rhok*gh; + + if (p_rgh.needReference()) + { + p += dimensionedScalar + ( + "p", + p.dimensions(), + pRefValue - getRefCellValue(p, pRefCell) + ); + p_rgh = p - rhok*gh; + } } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files new file mode 100644 index 0000000000..f4053436b5 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/files @@ -0,0 +1,3 @@ +buoyantPimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantPimpleFoam diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options similarity index 90% rename from applications/solvers/heatTransfer/buoyantPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options index f26563fc0f..8d01214e6c 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/Make/options @@ -7,6 +7,7 @@ EXE_LIBS = \ -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lfiniteVolume diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H similarity index 63% rename from applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H index d4878d063d..8c6a3f7671 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/UEqn.H @@ -17,8 +17,11 @@ == fvc::reconstruct ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) + ( + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p_rgh) + )*mesh.magSf() + ), + mesh.solver(U.select(finalIter)) ); } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C new file mode 100644 index 0000000000..cb4c4d34f6 --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/buoyantPimpleFoam.C @@ -0,0 +1,118 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + buoyantPimpleFoam + +Description + Transient solver for buoyant, turbulent flow of compressible fluids for + ventilation and heat-transfer. + + Turbulence is modelled using a run-time selectable compressible RAS or + LES model. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "basicRhoThermo.H" +#include "turbulenceModel.H" +#include "fixedGradientFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readGravitationalAcceleration.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + #include "readPIMPLEControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + + Info<< "Time = " << runTime.timeName() << nl << endl; + + #include "rhoEqn.H" + + // --- Pressure-velocity PIMPLE corrector loop + for (int oCorr=0; oCorrcorrect(); + + rho = thermo.rho(); + + if (finalIter) + { + mesh.data::remove("finalIteration"); + } + } + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H similarity index 72% rename from applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H index b8ac5595e4..e39d0bb803 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/createFields.H @@ -53,15 +53,30 @@ ) ); + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); + + Info<< "Reading field p_rgh\n" << endl; + volScalarField p_rgh + ( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + // Force p_rgh to be consistent with p + p_rgh = p - rho*gh; + Info<< "Creating field DpDt\n" << endl; volScalarField DpDt ( "DpDt", fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) ); - - thermo.correct(); - - dimensionedScalar initialMass = fvc::domainIntegrate(rho); - - dimensionedScalar totalVolume = sum(mesh.V()); diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H similarity index 80% rename from applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H rename to applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H index 3125cc3ffa..94537508b3 100644 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/hEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/hEqn.H @@ -9,7 +9,7 @@ ); hEqn.relax(); - hEqn.solve(); + hEqn.solve(mesh.solver(h.select(finalIter))); thermo.correct(); } diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H new file mode 100644 index 0000000000..05863b264c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -0,0 +1,70 @@ +{ + rho = thermo.rho(); + + // Thermodynamic density needs to be updated by psi*d(p) after the + // pressure solution - done in 2 parts. Part 1: + thermo.rho() -= psi*p_rgh; + + volScalarField rAU = 1.0/UEqn.A(); + surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); + + U = rAU*UEqn.H(); + + phi = fvc::interpolate(rho)* + ( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rAU, rho, U, phi) + ); + + surfaceScalarField buoyancyPhi = -rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf(); + phi += buoyancyPhi; + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix p_rghEqn + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) + + fvc::div(phi) + - fvm::laplacian(rhorAUf, p_rgh) + ); + + p_rghEqn.solve + ( + mesh.solver + ( + p_rgh.select + ( + ( + finalIter + && corr == nCorr-1 + && nonOrth == nNonOrthCorr + ) + ) + ) + ); + + if (nonOrth == nNonOrthCorr) + { + // Calculate the conservative fluxes + phi += p_rghEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p_rgh.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U += rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf); + U.correctBoundaryConditions(); + } + } + + p = p_rgh + rho*gh; + + // Second part of thermodynamic density update + thermo.rho() += psi*p_rgh; + + DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + + #include "rhoEqn.H" + #include "compressibleContinuityErrs.H" +} diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files b/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files deleted file mode 100644 index 65e5d52305..0000000000 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -buoyantPisoFoam.C - -EXE = $(FOAM_APPBIN)/buoyantPisoFoam diff --git a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H deleted file mode 100644 index c954c0ecb1..0000000000 --- a/applications/solvers/heatTransfer/buoyantPisoFoam/pEqn.H +++ /dev/null @@ -1,71 +0,0 @@ -{ - bool closedVolume = p.needReference(); - - rho = thermo.rho(); - - // Thermodynamic density needs to be updated by psi*d(p) after the - // pressure solution - done in 2 parts. Part 1: - thermo.rho() -= psi*p; - - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); - - U = rUA*UEqn.H(); - - surfaceScalarField phiU - ( - fvc::interpolate(rho) - *( - (fvc::interpolate(U) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phi) - ) - ); - - phi = phiU + rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvc::ddt(rho) + psi*correction(fvm::ddt(p)) - + fvc::div(phi) - - fvm::laplacian(rhorUAf, p) - ); - - if (corr == nCorr-1 && nonOrth == nNonOrthCorr) - { - pEqn.solve(mesh.solver(p.name() + "Final")); - } - else - { - pEqn.solve(mesh.solver(p.name())); - } - - if (nonOrth == nNonOrthCorr) - { - phi += pEqn.flux(); - } - } - - // Second part of thermodynamic density update - thermo.rho() += psi*p; - - U += rUA*fvc::reconstruct((phi - phiU)/rhorUAf); - U.correctBoundaryConditions(); - - DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); - - #include "rhoEqn.H" - #include "compressibleContinuityErrs.H" - - // For closed-volume cases adjust the pressure and density levels - // to obey overall mass continuity - if (closedVolume) - { - p += - (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); - thermo.rho() = psi*p; - rho += (initialMass - fvc::domainIntegrate(rho))/totalVolume; - } -} diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options index ec604cf28c..c8a3b02a0f 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/Make/options @@ -9,5 +9,6 @@ EXE_LIBS = \ -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lfiniteVolume diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H index 5609883607..5fbfb3f764 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/UEqn.H @@ -8,13 +8,18 @@ UEqn().relax(); - solve - ( - UEqn() - == - fvc::reconstruct + if (momentumPredictor) + { + solve ( - fvc::interpolate(rho)*(g & mesh.Sf()) - - fvc::snGrad(p)*mesh.magSf() - ) - ); + UEqn() + == + fvc::reconstruct + ( + ( + - ghf*fvc::snGrad(rho) + - fvc::snGrad(p_rgh) + )*mesh.magSf() + ) + ); + } diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C index dd33d3ec07..64cc110cec 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/buoyantSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) #include "readSIMPLEControls.H" - p.storePrevIter(); + p_rgh.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index b304ace104..d6fa9acee9 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -23,7 +23,6 @@ volScalarField& h = thermo.h(); const volScalarField& psi = thermo.psi(); - Info<< "Reading field U\n" << endl; volVectorField U ( @@ -40,7 +39,6 @@ #include "compressibleCreatePhi.H" - Info<< "Creating turbulence model\n" << endl; autoPtr turbulence ( @@ -53,17 +51,39 @@ ) ); - thermo.correct(); + + Info<< "Calculating field g.h\n" << endl; + volScalarField gh("gh", g & mesh.C()); + surfaceScalarField ghf("ghf", g & mesh.Cf()); + + Info<< "Reading field p_rgh\n" << endl; + volScalarField p_rgh + ( + IOobject + ( + "p_rgh", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + // Force p_rgh to be consistent with p + p_rgh = p - rho*gh; + label pRefCell = 0; scalar pRefValue = 0.0; setRefCell ( p, + p_rgh, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue ); - dimensionedScalar initialMass = fvc::domainIntegrate(rho); + dimensionedScalar totalVolume = sum(mesh.V()); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H index b91a17ee7c..6e607f89e8 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/hEqn.H @@ -10,7 +10,6 @@ ); hEqn.relax(); - hEqn.solve(); thermo.correct(); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index b0aa0852b2..197005e0f7 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -1,63 +1,57 @@ { rho = thermo.rho(); + rho.relax(); - volScalarField rUA = 1.0/UEqn().A(); - surfaceScalarField rhorUAf("(rho*(1|A(U)))", fvc::interpolate(rho*rUA)); + volScalarField rAU = 1.0/UEqn().A(); + surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); - U = rUA*UEqn().H(); + U = rAU*UEqn().H(); UEqn.clear(); phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); - bool closedVolume = adjustPhi(phi, U, p); + bool closedVolume = adjustPhi(phi, U, p_rgh); - surfaceScalarField buoyancyPhi = - rhorUAf*fvc::interpolate(rho)*(g & mesh.Sf()); - phi += buoyancyPhi; + surfaceScalarField buoyancyPhi = rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf(); + phi -= buoyancyPhi; for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { - fvScalarMatrix pEqn + fvScalarMatrix p_rghEqn ( - fvm::laplacian(rhorUAf, p) == fvc::div(phi) + fvm::laplacian(rhorAUf, p_rgh) == fvc::div(phi) ); - pEqn.setReference(pRefCell, pRefValue); - - // retain the residual from the first iteration - if (nonOrth == 0) - { - pEqn.solve(); - } - else - { - pEqn.solve(); - } + p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); + p_rghEqn.solve(); if (nonOrth == nNonOrthCorr) { - // For closed-volume cases adjust the pressure and density levels - // to obey overall mass continuity - if (closedVolume) - { - p += (initialMass - fvc::domainIntegrate(psi*p)) - /fvc::domainIntegrate(psi); - } - // Calculate the conservative fluxes - phi -= pEqn.flux(); + phi -= p_rghEqn.flux(); // Explicitly relax pressure for momentum corrector - p.relax(); + p_rgh.relax(); // Correct the momentum source with the pressure gradient flux // calculated from the relaxed pressure - U += rUA*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorUAf); + U -= rAU*fvc::reconstruct((buoyancyPhi + p_rghEqn.flux())/rhorAUf); U.correctBoundaryConditions(); } } #include "continuityErrs.H" + p = p_rgh + rho*gh; + + // For closed-volume cases adjust the pressure level + // to obey overall mass continuity + if (closedVolume) + { + p += (initialMass - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); + p_rgh = p - rho*gh; + } + rho = thermo.rho(); rho.relax(); Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/files b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/files new file mode 100644 index 0000000000..25c10cc98f --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/files @@ -0,0 +1,3 @@ +buoyantSimpleFoam.C + +EXE = $(FOAM_APPBIN)/buoyantSimpleFoam diff --git a/applications/solvers/compressible/rhoPisoFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/options similarity index 56% rename from applications/solvers/compressible/rhoPisoFoam/Make/options rename to applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/options index 5c62488b65..ec604cf28c 100644 --- a/applications/solvers/compressible/rhoPisoFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/Make/options @@ -1,13 +1,13 @@ EXE_INC = \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/lnInclude \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -lfiniteVolume \ -lmeshTools \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleRASModels \ - -lcompressibleLESModels + -lfiniteVolume diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/UEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/UEqn.H new file mode 100644 index 0000000000..e51dfcdfcb --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/UEqn.H @@ -0,0 +1,24 @@ + // Solve the Momentum equation + + tmp UEqn + ( + fvm::div(phi, U) + + turbulence->divDevRhoReff(U) + ); + + UEqn().relax(); + + solve + ( + UEqn() + == + rho*g + - fvc::grad(p) + /* + fvc::reconstruct + ( + fvc::interpolate(rho)*(g & mesh.Sf()) + - fvc::snGrad(p)*mesh.magSf() + ) + */ + ); diff --git a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/buoyantSimpleFoam.C similarity index 76% rename from applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C rename to applications/solvers/heatTransfer/buoyantSimpleFoam_old/buoyantSimpleFoam.C index 105717378e..24878e339c 100644 --- a/applications/solvers/compressible/rhoPisoFoam/rhoPisoFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/buoyantSimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,61 +22,51 @@ License along with OpenFOAM. If not, see . Application - rhoPisoFoam + buoyantSimpleFoam Description - Transient PISO solver for compressible, laminar or turbulent flow. + Steady-state solver for buoyant, turbulent flow of compressible fluids \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "basicPsiThermo.H" -#include "turbulenceModel.H" +#include "RASModel.H" +#include "fixedGradientFvPatchFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { #include "setRootCase.H" - #include "createTime.H" #include "createMesh.H" + #include "readGravitationalAcceleration.H" #include "createFields.H" #include "initContinuityErrs.H" - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; - while (runTime.run()) + while (runTime.loop()) { - #include "readTimeControls.H" - #include "readPISOControls.H" - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - #include "rhoEqn.H" - #include "UEqn.H" + #include "readSIMPLEControls.H" - // --- PISO loop - for (int corr=1; corr<=nCorr; corr++) + p.storePrevIter(); + rho.storePrevIter(); + + // Pressure-velocity SIMPLE corrector { + #include "UEqn.H" #include "hEqn.H" #include "pEqn.H" } turbulence->correct(); - rho = thermo.rho(); - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/compressible/rhoPisoFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/createFields.H similarity index 65% rename from applications/solvers/compressible/rhoPisoFoam/createFields.H rename to applications/solvers/heatTransfer/buoyantSimpleFoam_old/createFields.H index fdb706a14c..b304ace104 100644 --- a/applications/solvers/compressible/rhoPisoFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/createFields.H @@ -6,10 +6,6 @@ ); basicPsiThermo& thermo = pThermo(); - volScalarField& p = thermo.p(); - volScalarField& h = thermo.h(); - const volScalarField& psi = thermo.psi(); - volScalarField rho ( IOobject @@ -18,12 +14,17 @@ runTime.timeName(), mesh, IOobject::NO_READ, - IOobject::AUTO_WRITE + IOobject::NO_WRITE ), thermo.rho() ); - Info<< "\nReading field U\n" << endl; + volScalarField& p = thermo.p(); + volScalarField& h = thermo.h(); + const volScalarField& psi = thermo.psi(); + + + Info<< "Reading field U\n" << endl; volVectorField U ( IOobject @@ -37,13 +38,13 @@ mesh ); -# include "compressibleCreatePhi.H" + #include "compressibleCreatePhi.H" Info<< "Creating turbulence model\n" << endl; - autoPtr turbulence + autoPtr turbulence ( - compressible::turbulenceModel::New + compressible::RASModel::New ( rho, U, @@ -52,7 +53,17 @@ ) ); + thermo.correct(); - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt = - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell + ( + p, + mesh.solutionDict().subDict("SIMPLE"), + pRefCell, + pRefValue + ); + + + dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/hEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/hEqn.H new file mode 100644 index 0000000000..b91a17ee7c --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/hEqn.H @@ -0,0 +1,17 @@ +{ + fvScalarMatrix hEqn + ( + fvm::div(phi, h) + - fvm::Sp(fvc::div(phi), h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p)) + - p*fvc::div(phi/fvc::interpolate(rho)) + ); + + hEqn.relax(); + + hEqn.solve(); + + thermo.correct(); +} diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H new file mode 100644 index 0000000000..34536155ef --- /dev/null +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H @@ -0,0 +1,57 @@ +{ + rho = thermo.rho(); + + volScalarField rAU = 1.0/UEqn().A(); + surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU)); + + U = rAU*UEqn().H(); + UEqn.clear(); + + phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); + bool closedVolume = adjustPhi(phi, U, p); + + surfaceScalarField buoyancyPhi = + rhorAUf*fvc::interpolate(rho)*(g & mesh.Sf()); + phi += buoyancyPhi; + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvm::laplacian(rhorAUf, p) == fvc::div(phi) + ); + + pEqn.setReference(pRefCell, pRefValue); + pEqn.solve(); + + if (nonOrth == nNonOrthCorr) + { + // For closed-volume cases adjust the pressure and density levels + // to obey overall mass continuity + if (closedVolume) + { + p += (initialMass - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); + } + + // Calculate the conservative fluxes + phi -= pEqn.flux(); + + // Explicitly relax pressure for momentum corrector + p.relax(); + + // Correct the momentum source with the pressure gradient flux + // calculated from the relaxed pressure + U += rAU*(rho*g - fvc::grad(p)); + //U += rAU*fvc::reconstruct((buoyancyPhi - pEqn.flux())/rhorAUf); + U.correctBoundaryConditions(); + } + } + + #include "continuityErrs.H" + + rho = thermo.rho(); + rho.relax(); + Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() + << endl; +} diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options index 89d7787af6..7058e8a503 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/Make/options @@ -12,6 +12,7 @@ EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ -lradiation \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lfiniteVolume \ -lmeshTools diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C index 7e6d74b98d..6c35536333 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/buoyantSimpleRadiationFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -58,7 +58,7 @@ int main(int argc, char *argv[]) #include "readSIMPLEControls.H" - p.storePrevIter(); + p_rgh.storePrevIter(); rho.storePrevIter(); // Pressure-velocity SIMPLE corrector diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files index 68d70ae718..c62898c31f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/files @@ -1,5 +1,3 @@ -regionProperties/regionProperties.C - derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C fluid/compressibleCourantNo.C diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options index 4cd6539edf..71580ca21d 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/Make/options @@ -1,16 +1,19 @@ EXE_INC = \ -Ifluid \ -Isolid \ - -IregionProperties \ -Iinclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel + -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude EXE_LIBS = \ -lbasicThermophysicalModels \ + -lbasicSolidThermo \ -lspecie \ + -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ + -lmeshTools \ -lfiniteVolume diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 738319ec10..0f9ff2f7f2 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,12 +31,13 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "basicPsiThermo.H" +#include "basicRhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" #include "regionProperties.H" #include "compressibleCourantNo.H" #include "solidRegionDiffNo.H" +#include "basicSolidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -92,6 +93,8 @@ int main(int argc, char *argv[]) // --- PIMPLE loop for (int oCorr=0; oCorr. - -\*---------------------------------------------------------------------------*/ - -#include "compressibleCourantNo.H" -#include "fvc.H" - -Foam::scalar Foam::compressibleCourantNo -( - const fvMesh& mesh, - const Time& runTime, - const volScalarField& rho, - const surfaceScalarField& phi -) -{ - scalar CoNum = 0.0; - scalar meanCoNum = 0.0; - - //- Can have fluid domains with 0 cells so do not test. - //if (mesh.nInternalFaces()) - { - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs() - * mag(phi) - / fvc::interpolate(rho); - - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); - - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); - } - - Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum - << " max: " << CoNum << endl; - - return CoNum; -} - - -// ************************************************************************* // diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index 2d2ccf9a5e..75191acff9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -1,17 +1,21 @@ // Initialise fluid field pointer lists - PtrList thermoFluid(fluidRegions.size()); + PtrList thermoFluid(fluidRegions.size()); PtrList rhoFluid(fluidRegions.size()); PtrList KFluid(fluidRegions.size()); PtrList UFluid(fluidRegions.size()); PtrList phiFluid(fluidRegions.size()); PtrList gFluid(fluidRegions.size()); PtrList turbulence(fluidRegions.size()); - PtrList DpDtf(fluidRegions.size()); + PtrList p_rghFluid(fluidRegions.size()); + PtrList ghFluid(fluidRegions.size()); + PtrList ghfFluid(fluidRegions.size()); List initialMassFluid(fluidRegions.size()); List