mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Fixing code style requirements for more files - those not
picked up by a copyright change.
This commit is contained in:
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
surfaceScalarField::GeometricBoundaryField& phiPatches = phi.boundaryField();
|
||||
const volVectorField::GeometricBoundaryField& rhoUpatches = rhoU.boundaryField();
|
||||
const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField();
|
||||
surfaceScalarField::GeometricBoundaryField& phiPatches =
|
||||
phi.boundaryField();
|
||||
|
||||
const volVectorField::GeometricBoundaryField& rhoUpatches =
|
||||
rhoU.boundaryField();
|
||||
|
||||
const surfaceVectorField::GeometricBoundaryField& SfPatches =
|
||||
mesh.Sf().boundaryField();
|
||||
|
||||
forAll(phiPatches, patchI)
|
||||
{
|
||||
|
||||
@ -25,9 +25,9 @@ Global
|
||||
setMultiRegionDeltaT
|
||||
|
||||
Description
|
||||
Reset the timestep to maintain a constant maximum courant and diffusion
|
||||
Numbers. Reduction of time-step is immediate, but increase is damped to avoid
|
||||
unstable oscillations.
|
||||
Reset the timestep to maintain a constant maximum courant and
|
||||
diffusion Numbers. Reduction of time-step is immediate, but
|
||||
increase is damped to avoid unstable oscillations.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -67,7 +67,13 @@
|
||||
|
||||
label paRefCell = 0;
|
||||
scalar paRefValue = 0.0;
|
||||
setRefCell(pa, mesh.solutionDict().subDict("SIMPLE"), paRefCell, paRefValue);
|
||||
setRefCell
|
||||
(
|
||||
pa,
|
||||
mesh.solutionDict().subDict("SIMPLE"),
|
||||
paRefCell,
|
||||
paRefValue
|
||||
);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
@ -59,7 +59,8 @@ if (nWallFaces == 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< "Generating wall data for patch: " << patches[patchId].name() << endl;
|
||||
Info<< "Generating wall data for patch: " << patches[patchId].name()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
// store local id of near-walll cell to process
|
||||
@ -71,4 +72,3 @@ scalarField y =
|
||||
& (mesh.C().internalField() - mesh.C().boundaryField()[patchId][faceId]);
|
||||
|
||||
Info<< " Height to first cell centre y0 = " << y[cellId] << endl;
|
||||
|
||||
|
||||
@ -34,7 +34,13 @@
|
||||
betaEqn.relax();
|
||||
betaEqn.solve();
|
||||
|
||||
alpha = 0.5*(scalar(1) + sqr(scalar(1) - beta) - sqr(scalar(1) - alpha));
|
||||
alpha =
|
||||
0.5
|
||||
*(
|
||||
scalar(1)
|
||||
+ sqr(scalar(1) - beta)
|
||||
- sqr(scalar(1) - alpha)
|
||||
);
|
||||
*/
|
||||
|
||||
beta = scalar(1) - alpha;
|
||||
|
||||
@ -32,7 +32,11 @@
|
||||
|
||||
phi = alphaf*phia + betaf*phib;
|
||||
|
||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||
surfaceScalarField Dp
|
||||
(
|
||||
"(rho*(1|A(U)))",
|
||||
alphaf*rUaAf/rhoa + betaf*rUbAf/rhob
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
surfaceScalarField::GeometricBoundaryField& phivPatches = phiv.boundaryField();
|
||||
const volVectorField::GeometricBoundaryField& Upatches = U.boundaryField();
|
||||
const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField();
|
||||
surfaceScalarField::GeometricBoundaryField& phivPatches =
|
||||
phiv.boundaryField();
|
||||
|
||||
const volVectorField::GeometricBoundaryField& Upatches =
|
||||
U.boundaryField();
|
||||
|
||||
const surfaceVectorField::GeometricBoundaryField& SfPatches =
|
||||
mesh.Sf().boundaryField();
|
||||
|
||||
forAll(phivPatches, patchI)
|
||||
{
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
fvc::interpolate(interface.sigmaK())
|
||||
*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
|
||||
@ -59,7 +59,17 @@
|
||||
alpharScheme
|
||||
);
|
||||
|
||||
MULES::explicitSolve(geometricOneField(), alpha1, phi, phiAlpha1, Sp, Su, 1, 0);
|
||||
MULES::explicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
alpha1,
|
||||
phi,
|
||||
phiAlpha1,
|
||||
Sp,
|
||||
Su,
|
||||
1,
|
||||
0
|
||||
);
|
||||
|
||||
surfaceScalarField rho1f = fvc::interpolate(rho1);
|
||||
surfaceScalarField rho2f = fvc::interpolate(rho2);
|
||||
|
||||
@ -26,7 +26,8 @@
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
fvc::interpolate(interface.sigmaK())
|
||||
*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
|
||||
@ -15,7 +15,8 @@
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
fvc::interpolate(interface.sigmaK())
|
||||
*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
|
||||
@ -50,9 +50,29 @@
|
||||
+ vDotcAlphal
|
||||
);
|
||||
|
||||
//MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||
//MULES::explicitSolve(geometricOneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0);
|
||||
MULES::implicitSolve(geometricOneField(), alpha1, phi, phiAlpha, Sp, Su, 1, 0);
|
||||
// MULES::explicitSolve(alpha1, phi, phiAlpha, 1, 0);
|
||||
// MULES::explicitSolve
|
||||
// (
|
||||
// geometricOneField(),
|
||||
// alpha1,
|
||||
// phi,
|
||||
// phiAlpha,
|
||||
// Sp,
|
||||
// Su,
|
||||
// 1,
|
||||
// 0
|
||||
// );
|
||||
MULES::implicitSolve
|
||||
(
|
||||
geometricOneField(),
|
||||
alpha1,
|
||||
phi,
|
||||
phiAlpha,
|
||||
Sp,
|
||||
Su,
|
||||
1,
|
||||
0
|
||||
);
|
||||
|
||||
rhoPhi +=
|
||||
(runTime.deltaT()/totalDeltaT)
|
||||
|
||||
@ -15,7 +15,8 @@
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
fvc::interpolate(interface.sigmaK())
|
||||
*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
|
||||
@ -45,7 +45,11 @@
|
||||
|
||||
phi = alphaf*phia + betaf*phib;
|
||||
|
||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||
surfaceScalarField Dp
|
||||
(
|
||||
"(rho*(1|A(U)))",
|
||||
alphaf*rUaAf/rhoa + betaf*rUbAf/rhob
|
||||
);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
|
||||
@ -715,7 +715,12 @@ static uint32_t crc_16_table[16] = {
|
||||
* Unfortunately, DOCSIS uses x^16+x^12+x^5+1. D'oh!
|
||||
*/
|
||||
|
||||
static uint32_t GetCRC16Update (uint32_t start_crc, const char * data_stream, int length) {
|
||||
static uint32_t GetCRC16Update
|
||||
(
|
||||
uint32_t start_crc,
|
||||
const char * data_stream,
|
||||
int length
|
||||
) {
|
||||
uint32_t crc = start_crc;
|
||||
uint32_t r;
|
||||
|
||||
@ -810,7 +815,12 @@ register uint32_t crc_accum;
|
||||
|
||||
/* update the CRC on the data block one byte at a time */
|
||||
|
||||
static uint32_t UpdateCRC32 (uint32_t crc_accum, const char *data_blk_ptr, int data_blk_size) {
|
||||
static uint32_t UpdateCRC32
|
||||
(
|
||||
uint32_t crc_accum,
|
||||
const char *data_blk_ptr,
|
||||
int data_blk_size
|
||||
) {
|
||||
register int j;
|
||||
register uint8_t i;
|
||||
|
||||
|
||||
@ -53,12 +53,15 @@ inline void reportInfo()
|
||||
<< " utilization: " << (nBits * offset) << nl;
|
||||
|
||||
Info<< " Masking:" << nl
|
||||
<< " shift << " << unsigned(nBits * offset) << nl
|
||||
<< " shift >> " << unsigned((sizeof(unsigned)*CHAR_BIT) - nBits * offset)
|
||||
<< " shift << "
|
||||
<< unsigned(nBits * offset) << nl
|
||||
<< " shift >> "
|
||||
<< unsigned((sizeof(unsigned)*CHAR_BIT) - nBits * offset)
|
||||
<< nl;
|
||||
|
||||
hex(Info);
|
||||
Info<< " maskLower: " << PackedList<nBits>::maskLower(PackedList<nBits>::packing())
|
||||
Info<< " maskLower: "
|
||||
<< PackedList<nBits>::maskLower(PackedList<nBits>::packing())
|
||||
<< nl
|
||||
<< " useSHL: " << useSHL << nl
|
||||
<< " useSHR: " << useSHR << nl;
|
||||
|
||||
@ -62,11 +62,13 @@ int main(int argc, char *argv[])
|
||||
dictionary dict2(dict1.xfer());
|
||||
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << nl
|
||||
<< "dict2.toc(): " << dict2.name() << " " << dict2.toc() << endl;
|
||||
<< "dict2.toc(): " << dict2.name() << " " << dict2.toc()
|
||||
<< endl;
|
||||
|
||||
// copy back
|
||||
dict1 = dict2;
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc() << endl;
|
||||
Info<< "dict1.toc(): " << dict1.name() << " " << dict1.toc()
|
||||
<< endl;
|
||||
|
||||
dictionary dict3(dict2.subDictPtr("boundaryField"));
|
||||
dictionary dict4(dict2.subDictPtr("NONEXISTENT"));
|
||||
|
||||
@ -29,8 +29,11 @@ int main()
|
||||
|
||||
Info<< "tr.transform(v) " << tr.transform(v) << endl;
|
||||
|
||||
Info<< "(septernion(vector(0, -1, 0))*q*septernion(vector(0, 1, 0))).transform(v) "
|
||||
<< (septernion(vector(0, -1, 0))*q*septernion(vector(0, 1, 0))).transform(v)
|
||||
Info<< "(septernion(vector(0, -1, 0))*q*septernion(vector(0, 1, 0)))"
|
||||
<< ".transform(v) "
|
||||
<< (septernion(vector(0, -1, 0))
|
||||
*q
|
||||
*septernion(vector(0, 1, 0))).transform(v)
|
||||
<< endl;
|
||||
|
||||
return 0;
|
||||
|
||||
@ -452,7 +452,8 @@ int main(int argc, char *argv[])
|
||||
<< "(there is a points file in " << pointsInstance
|
||||
<< ")" << endl
|
||||
<< "Please rerun with the correct time specified"
|
||||
<< " (through the -constant, -time or -latestTime (at your option)."
|
||||
<< " (through the -constant, -time or -latestTime "
|
||||
<< "(at your option)."
|
||||
<< endl << exit(FatalError);
|
||||
}
|
||||
|
||||
|
||||
@ -1272,7 +1272,10 @@ int main(int argc, char *argv[])
|
||||
//Info<< " symm tensors :";
|
||||
//print(Info, symmNames);
|
||||
//
|
||||
//wordList tensorNames(sprayObjs.names(tensorIOField::typeName));
|
||||
//wordList tensorNames
|
||||
//(
|
||||
// sprayObjs.names(tensorIOField::typeName)
|
||||
//);
|
||||
//Info<< " tensors :";
|
||||
//print(Info, tensorNames);
|
||||
|
||||
|
||||
@ -112,7 +112,10 @@ Note
|
||||
|
||||
@verbatim
|
||||
<?xml version="1.0"?>
|
||||
<VTKFile type="Collection" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
|
||||
<VTKFile type="Collection"
|
||||
version="0.1"
|
||||
byte_order="LittleEndian"
|
||||
compressor="vtkZLibDataCompressor">
|
||||
<Collection>
|
||||
<DataSet timestep="50" file="pitzDaily_2.vtu"/>
|
||||
<DataSet timestep="100" file="pitzDaily_3.vtu"/>
|
||||
|
||||
@ -19,7 +19,8 @@ int USERD_get_maxsize_info
|
||||
label nPyr05Max = 0;
|
||||
label nTet04Max = 0;
|
||||
|
||||
Info<< "Checking all time steps for EnSight memory allocation purpose. This can take some time." << endl;
|
||||
Info<< "Checking all time steps for EnSight memory allocation purpose. "
|
||||
<< "This can take some time." << endl;
|
||||
|
||||
for (label timeI=1; timeI < timeDirs.size(); ++timeI)
|
||||
{
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
int USERD_get_nsided_conn
|
||||
(
|
||||
int part_number,
|
||||
@ -13,7 +12,8 @@ int USERD_get_nsided_conn
|
||||
#endif
|
||||
if (part_number == 1)
|
||||
{
|
||||
Info<< "************* EEEEEEEEERRRRRRRRRRRRRRRRRR *************** " << endl << flush;
|
||||
Info<< "************* EEEEEEEEERRRRRRRRRRRRRRRRRR *************** "
|
||||
<< endl << flush;
|
||||
|
||||
}
|
||||
else if (part_number < nPatches+2)
|
||||
|
||||
@ -198,7 +198,8 @@ int USERD_set_filenames
|
||||
runTime.setTime(timeDirs[Current_time_step], Current_time_step);
|
||||
|
||||
Num_variables = nVar + nSprayVariables;
|
||||
Numparts_available = Num_unstructured_parts + Num_structured_parts + nPatches;
|
||||
Numparts_available =
|
||||
Num_unstructured_parts + Num_structured_parts + nPatches;
|
||||
|
||||
#ifdef ENSIGHTDEBUG
|
||||
Info<< "Leaving: USERD_set_filenames" << endl << flush;
|
||||
@ -206,4 +207,3 @@ int USERD_set_filenames
|
||||
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -280,4 +280,3 @@ void RenderModel() {
|
||||
}
|
||||
PostString(buf,0,-2,5);
|
||||
}
|
||||
|
||||
|
||||
@ -6,4 +6,3 @@ void PostString(char *_s,int _x,int _y,float _life=5.0);
|
||||
void RenderStrings();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -24,7 +24,9 @@ template <class Type> class List {
|
||||
Type * element;
|
||||
int num;
|
||||
int array_size;
|
||||
Type &operator[](int i){assert(i>=0 && i<num); return element[i];}
|
||||
Type &operator[](int i){
|
||||
assert(i>=0 && i<num);
|
||||
return element[i];}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -178,7 +178,8 @@ float ComputeEdgeCollapseCost(Vertex *u,Vertex *v) {
|
||||
for(i=0;i<u->face.num;i++) {
|
||||
float mincurv=1; // curve for face i and closer side to it
|
||||
for(int j=0;j<sides.num;j++) {
|
||||
// use dot product of face normals. '^' defined in vector
|
||||
// use dot product of face normals. '^'
|
||||
// defined in vector
|
||||
float dotprod = u->face[i]->normal ^ sides[j]->normal;
|
||||
mincurv = min(mincurv,(1-dotprod)/2.0f);
|
||||
}
|
||||
@ -208,8 +209,10 @@ void ComputeEdgeCostAtVertex(Vertex *v) {
|
||||
float dist;
|
||||
dist = ComputeEdgeCollapseCost(v,v->neighbor[i]);
|
||||
if(dist<v->objdist) {
|
||||
v->collapse=v->neighbor[i]; // candidate for edge collapse
|
||||
v->objdist=dist; // cost of the collapse
|
||||
// candidate for edge collapse
|
||||
v->collapse=v->neighbor[i];
|
||||
// cost of the collapse
|
||||
v->objdist=dist;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -310,4 +313,3 @@ void ProgressiveMesh(List<Vector> &vert, List<tridata> &tri,
|
||||
// The caller of this function should reorder their vertices
|
||||
// according to the returned "permutation".
|
||||
}
|
||||
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
/* Copyright 1996, Viewpoint Datalabs Int'l, www.viewpoint.com, 1-800-DATASET */
|
||||
/*
|
||||
# Usage Rights: You (the user) may use this model to help build cool personal
|
||||
# vrml worlds, but please give us credit when you do ("3D model provided by
|
||||
# Viewpoint Datalabs, www,viewpoint.com"). Please don't sell it or use it to
|
||||
# make money indirectly. Don't redistribute it or put it on a web site except
|
||||
# as a part of your personal, non-commerical vrml world. If you want to do a
|
||||
# commercial project, give us a call at 1-800-DATASET or visit www.viewpoint.com
|
||||
# and we'll help you obtain the rights to do so.
|
||||
*/
|
||||
# Usage Rights: You (the user) may use this model to help build
|
||||
# cool personal vrml worlds, but please give us credit when you do
|
||||
# ("3D model provided by Viewpoint Datalabs, www,viewpoint.com").
|
||||
# Please don't sell it or use it to make money indirectly. Don't
|
||||
# redistribute it or put it on a web site except as a part of your
|
||||
# personal, non-commerical vrml world. If you want to do a
|
||||
# commercial project, give us a call at 1-800-DATASET or visit
|
||||
# www.viewpoint.com and we'll help you obtain the rights to do so.
|
||||
# */
|
||||
|
||||
/*
|
||||
* Note that this data was put directly into the program
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
/* Copyright 1996, Viewpoint Datalabs Int'l, www.viewpoint.com, 1-800-DATASET */
|
||||
/*
|
||||
# Usage Rights: You (the user) may use this model to help build cool personal
|
||||
# vrml worlds, but please give us credit when you do ("3D model provided by
|
||||
# Viewpoint Datalabs, www,viewpoint.com"). Please don't sell it or use it to
|
||||
# make money indirectly. Don't redistribute it or put it on a web site except
|
||||
# as a part of your personal, non-commerical vrml world. If you want to do a
|
||||
# commercial project, give us a call at 1-800-DATASET or visit www.viewpoint.com
|
||||
# and we'll help you obtain the rights to do so.
|
||||
*/
|
||||
# Usage Rights: You (the user) may use this model to help build
|
||||
# cool personal vrml worlds, but please give us credit when you do
|
||||
# ("3D model provided by Viewpoint Datalabs, www,viewpoint.com").
|
||||
# Please don't sell it or use it to make money indirectly. Don't
|
||||
# redistribute it or put it on a web site except as a part of your
|
||||
# personal, non-commerical vrml world. If you want to do a
|
||||
# commercial project, give us a call at 1-800-DATASET or visit
|
||||
# www.viewpoint.com and we'll help you obtain the rights to do so.
|
||||
# */
|
||||
|
||||
/*
|
||||
* Note that this data was put directly into the program
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <assert.h>
|
||||
@ -25,13 +24,22 @@ Vector normalize(Vector v) {
|
||||
return v;
|
||||
}
|
||||
|
||||
Vector operator+(Vector v1,Vector v2) {return Vector(v1.x+v2.x,v1.y+v2.y,v1.z+v2.z);}
|
||||
Vector operator-(Vector v1,Vector v2) {return Vector(v1.x-v2.x,v1.y-v2.y,v1.z-v2.z);}
|
||||
Vector operator+(Vector v1,Vector v2)
|
||||
{
|
||||
return Vector(v1.x+v2.x,v1.y+v2.y,v1.z+v2.z);
|
||||
}
|
||||
Vector operator-(Vector v1,Vector v2)
|
||||
{
|
||||
return Vector(v1.x-v2.x,v1.y-v2.y,v1.z-v2.z);
|
||||
}
|
||||
Vector operator-(Vector v) {return Vector(-v.x,-v.y,-v.z);}
|
||||
Vector operator*(Vector v1,float s) {return Vector(v1.x*s,v1.y*s,v1.z*s);}
|
||||
Vector operator*(float s, Vector v1) {return Vector(v1.x*s,v1.y*s,v1.z*s);}
|
||||
Vector operator/(Vector v1,float s) {return v1*(1.0f/s);}
|
||||
float operator^(Vector v1,Vector v2) {return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;}
|
||||
float operator^(Vector v1,Vector v2)
|
||||
{
|
||||
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z;
|
||||
}
|
||||
Vector operator*(Vector v1,Vector v2) {
|
||||
return Vector(
|
||||
v1.y * v2.z - v1.z*v2.y,
|
||||
@ -103,6 +111,7 @@ Quaternion slerp(Quaternion a,Quaternion b,float interp){
|
||||
}
|
||||
float theta = float(acos(a^b));
|
||||
if(theta==0.0f) { return(a);}
|
||||
return a*float(sin(theta-interp*theta)/sin(theta)) + b*float(sin(interp*theta)/sin(theta));
|
||||
return
|
||||
a*float(sin(theta-interp*theta)/sin(theta))
|
||||
+ b*float(sin(interp*theta)/sin(theta));
|
||||
}
|
||||
|
||||
|
||||
@ -47,13 +47,26 @@ class Quaternion{
|
||||
public:
|
||||
float r,x,y,z;
|
||||
Quaternion(){x=y=z=0.0f;r=1.0f;};
|
||||
Quaternion(Vector v,float t){v=normalize(v);r=float(cos(t/2.0));v=v*float(sin(t/2.0));x=v.x;y=v.y;z=v.z;};
|
||||
Quaternion(Vector v,float t){
|
||||
v=normalize(v);
|
||||
r=float(cos(t/2.0));
|
||||
v=v*float(sin(t/2.0));
|
||||
x=v.x;
|
||||
y=v.y;
|
||||
z=v.z;
|
||||
};
|
||||
Quaternion(float _r,float _x,float _y,float _z){r=_r;x=_x;y=_y;z=_z;};
|
||||
float angle(){return float(acos(r)*2.0);}
|
||||
Vector axis(){Vector a(x,y,z); return a*float(1/sin(angle()/2.0));}
|
||||
Vector xdir(){return Vector(1-2*(y*y+z*z), 2*(x*y+r*z), 2*(x*z-r*y));}
|
||||
Vector ydir(){return Vector( 2*(x*y-r*z),1-2*(x*x+z*z), 2*(y*z+r*x));}
|
||||
Vector zdir(){return Vector( 2*(x*z+r*y), 2*(y*z-r*x),1-2*(x*x+y*y));}
|
||||
Vector xdir(){
|
||||
return Vector(1-2*(y*y+z*z), 2*(x*y+r*z), 2*(x*z-r*y));
|
||||
}
|
||||
Vector ydir(){
|
||||
return Vector( 2*(x*y-r*z),1-2*(x*x+z*z), 2*(y*z+r*x));
|
||||
}
|
||||
Vector zdir(){
|
||||
return Vector( 2*(x*z+r*y), 2*(y*z-r*x),1-2*(x*x+y*y));
|
||||
}
|
||||
matrix getmatrix(){return matrix(xdir(),ydir(),zdir());}
|
||||
//operator matrix(){return getmatrix();}
|
||||
};
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Polygon Reduction Demo by Stan Melax (c) 1998
|
||||
* Permission to use any of this code wherever you want is granted..
|
||||
@ -108,7 +107,8 @@ Quaternion VirtualTrackBall(Vector cop,Vector cor,Vector dir1,Vector dir2) {
|
||||
float m;
|
||||
// compute plane
|
||||
Vector nrml = cor - cop;
|
||||
float fudgefactor = 1.0f/(magnitude(nrml) * 0.25f); // since trackball proportional to distance from cop
|
||||
// since trackball proportional to distance from cop
|
||||
float fudgefactor = 1.0f/(magnitude(nrml) * 0.25f);
|
||||
nrml = normalize(nrml);
|
||||
float dist = -(nrml^cor);
|
||||
Vector u= planelineintersection(nrml,dist,cop,cop+dir1);
|
||||
@ -285,7 +285,8 @@ HWND CreateOpenGLWindow(char* title)
|
||||
|
||||
if (!RegisterClass(&wc)) {
|
||||
MessageBox(NULL, "RegisterClass() failed: "
|
||||
"Cannot register window class.", "Error", MB_OK);
|
||||
"Cannot register window class.",
|
||||
"Error", MB_OK);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@ -295,7 +296,8 @@ HWND CreateOpenGLWindow(char* title)
|
||||
0,0,Width,Height, NULL, NULL, hInstance, NULL);
|
||||
|
||||
if (hWnd == NULL) {
|
||||
MessageBox(NULL, "CreateWindow() failed: Cannot create a window.",
|
||||
MessageBox(NULL,
|
||||
"CreateWindow() failed: Cannot create a window.",
|
||||
"Error", MB_OK);
|
||||
return NULL;
|
||||
}
|
||||
@ -307,7 +309,9 @@ HWND CreateOpenGLWindow(char* title)
|
||||
memset(&pfd, 0, sizeof(pfd));
|
||||
pfd.nSize = sizeof(pfd);
|
||||
pfd.nVersion = 1;
|
||||
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
|
||||
pfd.dwFlags = PFD_DRAW_TO_WINDOW
|
||||
| PFD_SUPPORT_OPENGL
|
||||
| PFD_DOUBLEBUFFER;
|
||||
pfd.iPixelType = PFD_TYPE_RGBA;
|
||||
pfd.cDepthBits = 32;
|
||||
pfd.cColorBits = 32;
|
||||
@ -315,7 +319,8 @@ HWND CreateOpenGLWindow(char* title)
|
||||
pf = ChoosePixelFormat(hDC, &pfd);
|
||||
if (pf == 0) {
|
||||
MessageBox(NULL, "ChoosePixelFormat() failed: "
|
||||
"Cannot find a suitable pixel format.", "Error", MB_OK);
|
||||
"Cannot find a suitable pixel format.",
|
||||
"Error", MB_OK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -352,11 +357,14 @@ HWND CreateOpenGLWindow(char* title)
|
||||
/* fill in the entries with an RGB color ramp. */
|
||||
for (i = 0; i < n; ++i) {
|
||||
lpPal->palPalEntry[i].peRed =
|
||||
(((i >> pfd.cRedShift) & redMask) * 255)/redMask;
|
||||
(((i >> pfd.cRedShift) & redMask) * 255)
|
||||
/redMask;
|
||||
lpPal->palPalEntry[i].peGreen =
|
||||
(((i >> pfd.cGreenShift) & greenMask) * 255)/greenMask;
|
||||
(((i >> pfd.cGreenShift) & greenMask) * 255)
|
||||
/greenMask;
|
||||
lpPal->palPalEntry[i].peBlue =
|
||||
(((i >> pfd.cBlueShift) & blueMask) * 255)/blueMask;
|
||||
(((i >> pfd.cBlueShift) & blueMask) * 255)
|
||||
/blueMask;
|
||||
lpPal->palPalEntry[i].peFlags = 0;
|
||||
}
|
||||
} else {
|
||||
@ -427,7 +435,8 @@ int APIENTRY WinMain(HINSTANCE hCurrentInst, HINSTANCE hPreviousInst,
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
} else {
|
||||
goto quit; // This 'goto' was in the sample code
|
||||
// This 'goto' was in the sample code
|
||||
goto quit;
|
||||
}
|
||||
}
|
||||
CalcFPSDeltaT();
|
||||
|
||||
@ -364,7 +364,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
|
||||
Info<< "writing surfMesh again well: " << surfOut.objectPath() << endl;
|
||||
Info<< "writing surfMesh again well: " << surfOut.objectPath()
|
||||
<< endl;
|
||||
surfOut.write();
|
||||
|
||||
// write directly
|
||||
|
||||
@ -88,7 +88,8 @@ int main(int argc, char *argv[])
|
||||
// - explicitly named patches only (-patches (at your option)
|
||||
// - all patches (default in sequential mode)
|
||||
// - all non-processor patches (default in parallel mode)
|
||||
// - all non-processor patches (sequential mode, -excludeProcPatches (at your option)
|
||||
// - all non-processor patches (sequential mode, -excludeProcPatches
|
||||
// (at your option)
|
||||
|
||||
// Construct table of patches to include.
|
||||
const polyBoundaryMesh& bMesh = mesh.boundaryMesh();
|
||||
|
||||
@ -481,8 +481,8 @@ label sharedFace
|
||||
}
|
||||
|
||||
|
||||
// Calculate (inward pointing) normals on edges shared by faces in faceToEdge and
|
||||
// averages them to pointNormals.
|
||||
// Calculate (inward pointing) normals on edges shared by faces in
|
||||
// faceToEdge and averages them to pointNormals.
|
||||
void calcPointVecs
|
||||
(
|
||||
const triSurface& surf,
|
||||
@ -696,8 +696,9 @@ int main(int argc, char *argv[])
|
||||
boolList borderEdge(surf.nEdges(), false);
|
||||
markBorderEdges(debug, surf, borderEdge);
|
||||
|
||||
// Points on two sides connected to borderEdges are called borderPoints and
|
||||
// will be duplicated. borderPoint contains label of newly introduced vertex.
|
||||
// Points on two sides connected to borderEdges are called
|
||||
// borderPoints and will be duplicated. borderPoint contains label
|
||||
// of newly introduced vertex.
|
||||
labelList borderPoint(surf.nPoints(), -1);
|
||||
markBorderPoints(debug, surf, borderEdge, borderPoint);
|
||||
|
||||
|
||||
@ -39,9 +39,10 @@ Description
|
||||
(baseType,thisType,memberFunction,argNames,lookup,functionPtr) \
|
||||
\
|
||||
/* Add the thisType memberFunction to the table, find by lookup name */ \
|
||||
baseType::add##memberFunction##argNames##StaticMemberFunctionToTable<thisType> \
|
||||
add_##lookup##_##thisType##memberFunction##argNames##StaticMemberFunctionTo##baseType##Table_\
|
||||
(#lookup, functionPtr)
|
||||
baseType::add##memberFunction##argNames## \
|
||||
StaticMemberFunctionToTable<thisType> \
|
||||
add_##lookup##_##thisType##memberFunction##argNames## \
|
||||
StaticMemberFunctionTo##baseType##Table_(#lookup, functionPtr)
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -28,20 +28,23 @@ License
|
||||
OpenFOAM is a free, open source CFD software package produced by
|
||||
a commercial company,
|
||||
<a href="http://www.openfoam.com/about">OpenCFD Ltd</a>.
|
||||
It has a
|
||||
large user base across most areas of engineering and science,
|
||||
from both commercial and academic organisations. OpenFOAM has an
|
||||
extensive range of features to solve anything from complex fluid
|
||||
flows involving chemical reactions, turbulence and heat transfer,
|
||||
to solid dynamics and electromagnetics.
|
||||
It has a large user base across most areas of engineering and
|
||||
science, from both commercial and academic organisations.
|
||||
OpenFOAM has an extensive range of features to solve anything from
|
||||
complex fluid flows involving chemical reactions, turbulence and
|
||||
heat transfer, to solid dynamics and electromagnetics.
|
||||
<a href="http://www.openfoam.com/features">More ...</a>
|
||||
|
||||
@section users Our commitment to the users
|
||||
|
||||
OpenFOAM comes with full commercial support from OpenCFD, including
|
||||
<a href="http://www.openfoam.com/support/software.php">software support</a>,
|
||||
<a href="http://www.openfoam.com/support/development.php">contracted developments</a>
|
||||
and a programme of <a href="http://www.openfoam.com/training/">training courses</a>.
|
||||
<a href="http://www.openfoam.com/support/software.php">
|
||||
software support</a>,
|
||||
<a href="http://www.openfoam.com/support/development.php">
|
||||
contracted developments</a>
|
||||
and a programme of
|
||||
<a href="http://www.openfoam.com/training/">
|
||||
training courses</a>.
|
||||
These activities fund the development, maintenance and release of
|
||||
OpenFOAM to make it an extremely viable commercial open source product.
|
||||
|
||||
@ -49,7 +52,8 @@ License
|
||||
|
||||
OpenCFD is committed to open source software, continually developing and
|
||||
maintaining OpenFOAM under the
|
||||
<a href="http://www.gnu.org/copyleft/gpl.html">GNU General Public Licence</a>.
|
||||
<a href="http://www.gnu.org/copyleft/gpl.html">
|
||||
GNU General Public Licence</a>.
|
||||
OpenFOAM will <strong>always</strong> be free of charge and open source.
|
||||
In addition, we endeavour to support other viable open source initiatives
|
||||
that will benefit science and engineering.
|
||||
|
||||
@ -693,7 +693,8 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName)
|
||||
|
||||
maxId = max(maxId, starRegion);
|
||||
|
||||
if (patchType == "BAFF") // should actually be case-insensitive
|
||||
// should actually be case-insensitive
|
||||
if (patchType == "BAFF")
|
||||
{
|
||||
nBafflePatches++;
|
||||
}
|
||||
|
||||
@ -140,7 +140,8 @@ public:
|
||||
//- Return a Map of (id => names) selected by patterns
|
||||
Map<word> names(const UList<wordRe>& patterns) const;
|
||||
|
||||
//- Return a Map of (id => name) for materialType (fluid | solid | shell)
|
||||
//- Return a Map of (id => name) for materialType
|
||||
// (fluid | solid | shell)
|
||||
Map<word> selectType(const word& materialType) const;
|
||||
|
||||
//- Return a Map of (id => name) for fluids
|
||||
|
||||
@ -1400,7 +1400,7 @@ Foam::polyDualMesh::polyDualMesh
|
||||
polyMesh
|
||||
(
|
||||
mesh,
|
||||
xferCopy(pointField()), // to prevent any warnings "points not allocated"
|
||||
xferCopy(pointField()),// to prevent any warnings "points not allocated"
|
||||
xferCopy(faceList()), // to prevent any warnings "faces not allocated"
|
||||
xferCopy(cellList())
|
||||
),
|
||||
@ -1445,7 +1445,7 @@ Foam::polyDualMesh::polyDualMesh
|
||||
polyMesh
|
||||
(
|
||||
mesh,
|
||||
xferCopy(pointField()), // to prevent any warnings "points not allocated"
|
||||
xferCopy(pointField()),// to prevent any warnings "points not allocated"
|
||||
xferCopy(faceList()), // to prevent any warnings "faces not allocated"
|
||||
xferCopy(cellList())
|
||||
),
|
||||
|
||||
@ -60,7 +60,11 @@
|
||||
*sqrt
|
||||
(
|
||||
4.0*Vk
|
||||
/(circleFraction*thickness*constant::mathematical::pi)
|
||||
/(
|
||||
circleFraction
|
||||
*thickness
|
||||
*constant::mathematical::pi
|
||||
)
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -247,7 +247,8 @@ Foam::MRFZone::MRFZone(const fvMesh& mesh, Istream& is)
|
||||
WarningIn("MRFZone(const fvMesh&, Istream&)")
|
||||
<< "Ignoring entry 'patches'\n"
|
||||
<< " By default all patches within the rotating region rotate.\n"
|
||||
<< " Optionally supply excluded patches using 'nonRotatingPatches'."
|
||||
<< " Optionally supply excluded patches "
|
||||
<< "using 'nonRotatingPatches'."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
|
||||
@ -208,7 +208,10 @@ inline Foam::labelList& Foam::TimeActivatedExplicitSource<Type>::cells()
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::List<typename Foam::TimeActivatedExplicitSource<Type>::fieldNameValuePair>&
|
||||
inline Foam::List
|
||||
<
|
||||
typename Foam::TimeActivatedExplicitSource<Type>::fieldNameValuePair
|
||||
>&
|
||||
Foam::TimeActivatedExplicitSource<Type>::fieldData()
|
||||
{
|
||||
return fieldData_;
|
||||
|
||||
@ -381,7 +381,10 @@ Foam::scalar Foam::commonRailInjector::Cd
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::commonRailInjector::fractionOfInjection(const scalar time) const
|
||||
Foam::scalar Foam::commonRailInjector::fractionOfInjection
|
||||
(
|
||||
const scalar time
|
||||
) const
|
||||
{
|
||||
return integrateTable(massFlowRateProfile_, time)/mass_;
|
||||
}
|
||||
|
||||
@ -103,13 +103,20 @@ private:
|
||||
//- Return the fraction of the total injected liquid
|
||||
scalar fractionOfInjection(const scalar time) const;
|
||||
|
||||
/*
|
||||
//- Return the average injection velocity
|
||||
scalar averageInjectionVelocityTime(const scalar liquidDensity) const;
|
||||
|
||||
//- Return the instantaneous injection velocity
|
||||
scalar injectionVelocity(const scalar, const scalar liquidDensity) const;
|
||||
*/
|
||||
// //- Return the average injection velocity
|
||||
// scalar averageInjectionVelocityTime
|
||||
// (
|
||||
// const scalar liquidDensity
|
||||
// ) const;
|
||||
|
||||
// //- Return the instantaneous injection velocity
|
||||
// scalar injectionVelocity
|
||||
// (
|
||||
// const scalar,
|
||||
// const scalar liquidDensity
|
||||
// ) const;
|
||||
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -465,7 +465,8 @@ void Foam::parcel::updateParcelProperties
|
||||
while ((n < sDB.evaporation().nEvapIter()) && (m() > VSMALL))
|
||||
{
|
||||
n++;
|
||||
// new characteristic times does not need to be calculated the first time
|
||||
// new characteristic times does not need to be calculated the
|
||||
// first time
|
||||
if (n > 1)
|
||||
{
|
||||
newDensity = fuels.rho(pg, Tnew, X());
|
||||
|
||||
@ -190,7 +190,8 @@ void Foam::parcel::setRelaxationTimes
|
||||
{
|
||||
if (!boiling)
|
||||
{
|
||||
// for saturation evaporation, only use 99.99% for numerical robustness
|
||||
// for saturation evaporation, only use 99.99% for
|
||||
// numerical robustness
|
||||
scalar dm = max(SMALL, 0.9999*msat[i] - mfg[i]);
|
||||
|
||||
tauEvaporation[i] = sDB.evaporation().relaxationTime
|
||||
@ -213,16 +214,23 @@ void Foam::parcel::setRelaxationTimes
|
||||
scalar Nusselt =
|
||||
sDB.heatTransfer().Nu(Reynolds, Prandtl);
|
||||
|
||||
// calculating the boiling temperature of the liquid at ambient pressure
|
||||
// calculating the boiling temperature of the liquid
|
||||
// at ambient pressure
|
||||
scalar tBoilingSurface = Td;
|
||||
|
||||
label Niter = 0;
|
||||
scalar deltaT = 10.0;
|
||||
scalar dp0 = fuels.properties()[i].pv(pressure, tBoilingSurface) - pressure;
|
||||
scalar dp0 =
|
||||
fuels.properties()[i].pv(pressure, tBoilingSurface)
|
||||
- pressure;
|
||||
while ((Niter < 200) && (mag(deltaT) > 1.0e-3))
|
||||
{
|
||||
Niter++;
|
||||
scalar pBoil = fuels.properties()[i].pv(pressure, tBoilingSurface);
|
||||
scalar pBoil = fuels.properties()[i].pv
|
||||
(
|
||||
pressure,
|
||||
tBoilingSurface
|
||||
);
|
||||
scalar dp = pBoil - pressure;
|
||||
if ( (dp > 0.0) && (dp0 > 0.0) )
|
||||
{
|
||||
@ -255,11 +263,19 @@ void Foam::parcel::setRelaxationTimes
|
||||
|
||||
forAll(sDB.gasProperties(), k)
|
||||
{
|
||||
vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface);
|
||||
vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature);
|
||||
vapourSurfaceEnthalpy +=
|
||||
sDB.composition().Y()[k][celli]
|
||||
*sDB.gasProperties()[k].H(tBoilingSurface);
|
||||
vapourFarEnthalpy +=
|
||||
sDB.composition().Y()[k][celli]
|
||||
*sDB.gasProperties()[k].H(temperature);
|
||||
}
|
||||
|
||||
scalar kLiquid = fuels.properties()[i].K(pressure, 0.5*(tBoilingSurface+T()));
|
||||
scalar kLiquid = fuels.properties()[i].K
|
||||
(
|
||||
pressure,
|
||||
0.5*(tBoilingSurface+T())
|
||||
);
|
||||
|
||||
tauBoiling[i] = sDB.evaporation().boilingTime
|
||||
(
|
||||
|
||||
@ -48,7 +48,11 @@ if (( xx > collProb) && (mMin > VSMALL) && (mMax > VSMALL)) {
|
||||
// use mass-averaged temperature to calculate We number
|
||||
scalar averageTemp = (pMax().T()*mMax + pMin().T()*mMin)/mTot;
|
||||
// and mass averaged mole fractions ...
|
||||
scalarField Xav((pMax().m()*pMax().X()+pMin().m()*pMin().X())/(pMax().m() + pMin().m()));
|
||||
scalarField Xav
|
||||
(
|
||||
(pMax().m()*pMax().X()+pMin().m()*pMin().X())
|
||||
/(pMax().m() + pMin().m())
|
||||
);
|
||||
scalar sigma = spray_.fuels().sigma(pc, averageTemp, Xav);
|
||||
sigma = max(1.0e-6, sigma);
|
||||
scalar rho = spray_.fuels().rho(pc, averageTemp, Xav);
|
||||
|
||||
@ -129,7 +129,9 @@ if (vAlign > 0)
|
||||
pMax().d() =
|
||||
pow
|
||||
(
|
||||
6.0*newMaxMass/(rhoMax*constant::mathematical::pi*nMax),
|
||||
6.0
|
||||
*newMaxMass
|
||||
/(rhoMax*constant::mathematical::pi*nMax),
|
||||
1.0/3.0
|
||||
);
|
||||
|
||||
|
||||
@ -253,7 +253,9 @@ Foam::scalar Foam::RutlandFlashBoil::boilingTime
|
||||
}
|
||||
|
||||
scalar Gf =
|
||||
4.0*alfaS*dTLB*constant::mathematical::pi*sqr(diameter/2.0)/heatOfVapour;
|
||||
4.0*alfaS*dTLB
|
||||
*constant::mathematical::pi*sqr(diameter/2.0)
|
||||
/heatOfVapour;
|
||||
|
||||
// calculation of the heat transfer vapourization at superheated
|
||||
// conditions (temperature>tBoilingSurface)
|
||||
@ -265,7 +267,8 @@ Foam::scalar Foam::RutlandFlashBoil::boilingTime
|
||||
mag((vapourFarEnthalpy-vapourSurfaceEnthalpy)/heatOfVapour);
|
||||
|
||||
// 2.0? or 1.0? try 1!
|
||||
scalar B = 1.0*constant::mathematical::pi*kappa/cpGas*diameter*NusseltCorr;
|
||||
scalar B =
|
||||
1.0*constant::mathematical::pi*kappa/cpGas*diameter*NusseltCorr;
|
||||
scalar nPos = B*log(1.0 + A)/Gf + 1.0;
|
||||
scalar nNeg = (1.0/A)*(exp(Gf/B) - 1.0 - A) + 1.0;
|
||||
|
||||
@ -338,7 +341,10 @@ Foam::scalar Foam::RutlandFlashBoil::boilingTime
|
||||
}
|
||||
}
|
||||
|
||||
time = (constant::mathematical::pi*pow3(diameter)/6.0)*liquidDensity/(G + Gf);
|
||||
time =
|
||||
(constant::mathematical::pi*pow3(diameter)/6.0)
|
||||
*liquidDensity
|
||||
/(G + Gf);
|
||||
|
||||
time = max(VSMALL, time);
|
||||
}
|
||||
|
||||
@ -77,7 +77,11 @@ Foam::ChomiakInjector::ChomiakInjector
|
||||
// correct velocityProfile
|
||||
forAll(sm.injectors(), i)
|
||||
{
|
||||
sm.injectors()[i].properties()->correctProfiles(sm.fuels(), referencePressure);
|
||||
sm.injectors()[i].properties()->correctProfiles
|
||||
(
|
||||
sm.fuels(),
|
||||
referencePressure
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -129,7 +133,8 @@ Foam::vector Foam::ChomiakInjector::direction
|
||||
scalar reduce = 0.01;
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
beta *= (1.0-2.0*reduce)*0.5*sm_.angleOfWedge()/constant::mathematical::pi;
|
||||
beta *=
|
||||
(1.0-2.0*reduce)*0.5*sm_.angleOfWedge()/constant::mathematical::pi;
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
|
||||
normal =
|
||||
|
||||
@ -150,7 +150,10 @@ Foam::vector Foam::blobsSwirlInjector::direction
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
|
||||
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
|
||||
beta *=
|
||||
(1.0 - 2.0*reduce)
|
||||
*sm_.angleOfWedge()
|
||||
/(constant::mathematical::twoPi);
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
normal =
|
||||
alpha
|
||||
|
||||
@ -30,7 +30,8 @@ Description
|
||||
Accurate description in:
|
||||
@verbatim
|
||||
Z. Han, S. Parrish, P.V. Farrell, R.D. Reitz
|
||||
"Modeling Atomization Processes Of Pressure Swirl Hollow-Cone Fuel Sprays"
|
||||
"Modeling Atomization Processes Of Pressure
|
||||
Swirl Hollow-Cone Fuel Sprays"
|
||||
Atomization and Sprays, vol. 7, pp. 663-684, 1997
|
||||
@endverbatim
|
||||
and
|
||||
|
||||
@ -129,7 +129,8 @@ Foam::vector Foam::constInjector::direction
|
||||
v (alpha)
|
||||
*/
|
||||
|
||||
scalar angle = rndGen_.scalar01()*sprayAngle_[n]*constant::mathematical::pi/360.0;
|
||||
scalar angle =
|
||||
rndGen_.scalar01()*sprayAngle_[n]*constant::mathematical::pi/360.0;
|
||||
scalar alpha = sin(angle);
|
||||
scalar dcorr = cos(angle);
|
||||
|
||||
@ -143,7 +144,10 @@ Foam::vector Foam::constInjector::direction
|
||||
scalar reduce = 0.01;
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
beta *= (1.0 - 2.0*reduce)*0.5*sm_.angleOfWedge()/constant::mathematical::pi;
|
||||
beta *=
|
||||
(1.0 - 2.0*reduce)
|
||||
*0.5*sm_.angleOfWedge()
|
||||
/constant::mathematical::pi;
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
|
||||
normal =
|
||||
|
||||
@ -172,7 +172,10 @@ Foam::vector Foam::definedHollowConeInjector::direction
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
|
||||
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
|
||||
beta *=
|
||||
(1.0 - 2.0*reduce)
|
||||
*sm_.angleOfWedge()
|
||||
/(constant::mathematical::twoPi);
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
normal =
|
||||
alpha
|
||||
|
||||
@ -223,7 +223,10 @@ Foam::vector Foam::definedPressureSwirlInjector::direction
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
|
||||
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
|
||||
beta *=
|
||||
(1.0 - 2.0*reduce)
|
||||
*sm_.angleOfWedge()
|
||||
/(constant::mathematical::twoPi);
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
normal =
|
||||
alpha
|
||||
@ -261,7 +264,10 @@ Foam::scalar Foam::definedPressureSwirlInjector::velocity
|
||||
}
|
||||
|
||||
|
||||
Foam::scalar Foam::definedPressureSwirlInjector::averageVelocity(const label i) const
|
||||
Foam::scalar Foam::definedPressureSwirlInjector::averageVelocity
|
||||
(
|
||||
const label i
|
||||
) const
|
||||
{
|
||||
const injectorType& it = sm_.injectors()[i].properties();
|
||||
|
||||
|
||||
@ -139,7 +139,10 @@ Foam::vector Foam::hollowConeInjector::direction
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
|
||||
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
|
||||
beta *=
|
||||
(1.0 - 2.0*reduce)
|
||||
*sm_.angleOfWedge()
|
||||
/(constant::mathematical::twoPi);
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
normal =
|
||||
alpha
|
||||
|
||||
@ -145,7 +145,10 @@ Foam::vector Foam::pressureSwirlInjector::direction
|
||||
// correct beta if this is a 2D run
|
||||
// map it onto the 'angleOfWedge'
|
||||
|
||||
beta *= (1.0 - 2.0*reduce)*sm_.angleOfWedge()/(constant::mathematical::twoPi);
|
||||
beta *=
|
||||
(1.0 - 2.0*reduce)
|
||||
*sm_.angleOfWedge()
|
||||
/(constant::mathematical::twoPi);
|
||||
beta += reduce*sm_.angleOfWedge();
|
||||
normal =
|
||||
alpha
|
||||
|
||||
@ -76,7 +76,8 @@ const Foam::dictionary& Foam::DevolatilisationModel<CloudType>::dict() const
|
||||
|
||||
|
||||
template<class CloudType>
|
||||
const Foam::dictionary& Foam::DevolatilisationModel<CloudType>::coeffDict() const
|
||||
const Foam::dictionary&
|
||||
Foam::DevolatilisationModel<CloudType>::coeffDict() const
|
||||
{
|
||||
return coeffDict_;
|
||||
}
|
||||
@ -87,4 +88,3 @@ const Foam::dictionary& Foam::DevolatilisationModel<CloudType>::coeffDict() cons
|
||||
#include "DevolatilisationModelNew.C"
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
|
||||
@ -29,7 +29,11 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebug(IOList<reactingMultiphaseParcelInjectionData>, 0);
|
||||
defineTemplateTypeNameAndDebug
|
||||
(
|
||||
IOList<reactingMultiphaseParcelInjectionData>,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -132,7 +132,10 @@ public:
|
||||
}
|
||||
|
||||
//- Read energyScalingFunction dictionary
|
||||
virtual bool read(const dictionary& energyScalingFunctionProperties) = 0;
|
||||
virtual bool read
|
||||
(
|
||||
const dictionary& energyScalingFunctionProperties
|
||||
) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,8 @@ Description
|
||||
@verbatim
|
||||
@ARTICLE{MA_Maitland_Smith,
|
||||
author = {{Maitland}, G.~C. and {Smith}, E.~B.},
|
||||
title = {A simplified representation of intermolecular potential energy},
|
||||
title = {A simplified representation of
|
||||
intermolecular potential energy},
|
||||
journal = {Chemical Physics Letters},
|
||||
year = 1973,
|
||||
month = oct,
|
||||
@ -45,7 +46,8 @@ Description
|
||||
Parameters for other monoatomics from:
|
||||
@verbatim
|
||||
@BOOK{MD_Maitland_Rigby_Smith_Wakeham,
|
||||
AUTHOR = {Geoffrey C. Maitland and Maurice Rigby and E. Brian Smith and William A. Wakeham},
|
||||
AUTHOR = {Geoffrey C. Maitland and Maurice Rigby and
|
||||
E. Brian Smith and William A. Wakeham},
|
||||
TITLE = {Intermolecular Forces: Their Origin and Determination},
|
||||
PUBLISHER = {Oxford University Press},
|
||||
YEAR = {1981}
|
||||
|
||||
@ -50,7 +50,8 @@ void Foam::tetherPotentialList::readTetherPotentialDict
|
||||
if (tetherId == -1)
|
||||
{
|
||||
FatalErrorIn("tetherPotentialList::readTetherPotentialDict")
|
||||
<< nl << "No matching entry found in siteIdList for tether name "
|
||||
<< nl
|
||||
<< "No matching entry found in siteIdList for tether name "
|
||||
<< tetherPotentialName
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
@ -590,7 +590,10 @@ Foam::booleanSurface::booleanSurface
|
||||
|
||||
// Copy points from subSurf1 and remember the labels of the ones in
|
||||
// the intersection
|
||||
labelList intersectionLabels(cutSurf1.nPoints() - cutSurf1.nSurfacePoints());
|
||||
labelList intersectionLabels
|
||||
(
|
||||
cutSurf1.nPoints() - cutSurf1.nSurfacePoints()
|
||||
);
|
||||
|
||||
label combinedPointI = 0;
|
||||
|
||||
|
||||
@ -250,11 +250,11 @@ void d2vec_part_quick_a ( int n, double a[], int *l, int *r )
|
||||
|
||||
return;
|
||||
}
|
||||
//*******************************************************************************
|
||||
//******************************************************************************
|
||||
|
||||
void d2vec_permute ( int n, double a[], int p[] )
|
||||
|
||||
//*******************************************************************************
|
||||
//******************************************************************************
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@ -383,7 +383,8 @@ int *d2vec_sort_heap_index_a ( int n, double a[] )
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// D2VEC_SORT_HEAP_INDEX_A does an indexed heap ascending sort of an R2 vector.
|
||||
// D2VEC_SORT_HEAP_INDEX_A does an indexed heap ascending sort of
|
||||
// an R2 vector.
|
||||
//
|
||||
// Discussion:
|
||||
//
|
||||
@ -864,7 +865,8 @@ void dmat_uniform ( int m, int n, double b, double c, int *seed, double r[] )
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// DMAT_UNIFORM fills a double precision array with scaled pseudorandom values.
|
||||
// DMAT_UNIFORM fills a double precision array with scaled
|
||||
// pseudorandom values.
|
||||
//
|
||||
// Discussion:
|
||||
//
|
||||
@ -983,8 +985,9 @@ int dtris2 ( int point_num, double point_xy[], int *tri_num,
|
||||
//
|
||||
// Input, int POINT_NUM, the number of vertices.
|
||||
//
|
||||
// Input/output, double POINT_XY[POINT_NUM*2], the coordinates of the vertices.
|
||||
// On output, the vertices have been sorted into dictionary order.
|
||||
// Input/output, double POINT_XY[POINT_NUM*2], the coordinates of
|
||||
// the vertices. On output, the vertices have been sorted into
|
||||
// dictionary order.
|
||||
//
|
||||
// Output, int *TRI_NUM, the number of triangles in the triangulation;
|
||||
// TRI_NUM is equal to 2*POINT_NUM - NB - 2, where NB is the number
|
||||
@ -1703,11 +1706,11 @@ int i_sign ( int i )
|
||||
}
|
||||
|
||||
}
|
||||
//*******************************************************************************
|
||||
//******************************************************************************
|
||||
|
||||
int i_wrap ( int ival, int ilo, int ihi )
|
||||
|
||||
//*******************************************************************************
|
||||
//******************************************************************************
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
@ -3008,7 +3011,8 @@ double *triangle_circumcenter_2d ( double t[] )
|
||||
//
|
||||
// Input, double T[2*3], the triangle vertices.
|
||||
//
|
||||
// Output, double *X, *Y, the coordinates of the circumcenter of the triangle.
|
||||
// Output, double *X, *Y, the coordinates of the circumcenter of
|
||||
// the triangle.
|
||||
//
|
||||
{
|
||||
# define DIM_NUM 2
|
||||
@ -3043,8 +3047,8 @@ double *triangle_circumcenter_2d ( double t[] )
|
||||
}
|
||||
//******************************************************************************
|
||||
|
||||
bool triangulation_plot_eps ( const char *file_out_name, int g_num, double g_xy[],
|
||||
int tri_num, int nod_tri[] )
|
||||
bool triangulation_plot_eps ( const char *file_out_name, int g_num,
|
||||
double g_xy[], int tri_num, int nod_tri[] )
|
||||
|
||||
//******************************************************************************
|
||||
//
|
||||
|
||||
@ -30,8 +30,8 @@ void ivec_heap_d ( int n, int a[] );
|
||||
int *ivec_indicator ( int n );
|
||||
void ivec_sort_heap_a ( int n, int a[] );
|
||||
void ivec_sorted_unique ( int n, int a[], int *nuniq );
|
||||
int lrline ( double xu, double yu, double xv1, double yv1, double xv2, double yv2,
|
||||
double dv );
|
||||
int lrline ( double xu, double yu, double xv1, double yv1, double xv2,
|
||||
double yv2, double dv );
|
||||
bool perm_check ( int n, int p[] );
|
||||
void perm_inv ( int n, int p[] );
|
||||
int *points_delaunay_naive_2d ( int n, double p[], int *ntri );
|
||||
@ -42,10 +42,9 @@ int swapec ( int i, int *top, int *btri, int *bedg, int point_num,
|
||||
void timestamp ( void );
|
||||
char *timestring ( void );
|
||||
double *triangle_circumcenter_2d ( double t[] );
|
||||
bool triangulation_plot_eps ( const char *file_out_name, int g_num, double g_xy[],
|
||||
int tri_num, int nod_tri[] );
|
||||
bool triangulation_plot_eps ( const char *file_out_name,
|
||||
int g_num, double g_xy[], int tri_num, int nod_tri[] );
|
||||
void triangulation_print ( int point_num, double xc[], int tri_num,
|
||||
int tri_vert[], int tri_nabe[] );
|
||||
void vbedg ( double x, double y, int point_num, double point_xy[], int tri_num,
|
||||
int tri_vert[], int tri_nabe[], int *ltri, int *ledg, int *rtri, int *redg );
|
||||
|
||||
|
||||
@ -29,7 +29,11 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineNamedTemplateTypeNameAndDebug(surfaceInterpolateFieldsFunctionObject, 0);
|
||||
defineNamedTemplateTypeNameAndDebug
|
||||
(
|
||||
surfaceInterpolateFieldsFunctionObject,
|
||||
0
|
||||
);
|
||||
|
||||
addToRunTimeSelectionTable
|
||||
(
|
||||
|
||||
@ -25,8 +25,8 @@ Typedef
|
||||
Foam::surfaceInterpolateFieldsFunctionObject
|
||||
|
||||
Description
|
||||
FunctionObject wrapper around surfaceInterpolateFields to allow them to be created via
|
||||
the functions entry within controlDict.
|
||||
FunctionObject wrapper around surfaceInterpolateFields to allow
|
||||
them to be created via the functions entry within controlDict.
|
||||
|
||||
SourceFiles
|
||||
surfaceInterpolateFieldsFunctionObject.C
|
||||
|
||||
@ -28,7 +28,9 @@ Description
|
||||
Rosin-Rammler pdf
|
||||
|
||||
@f[
|
||||
cumulative pdf = (1.0 - exp( -((x - d0)/d)^n ) / (1.0 - exp( -((d1 - d0)/d)^n )
|
||||
cumulative pdf =
|
||||
(1.0 - exp( -(( x - d0)/d)^n )
|
||||
/ (1.0 - exp( -((d1 - d0)/d)^n )
|
||||
@f]
|
||||
|
||||
|
||||
|
||||
@ -14,7 +14,8 @@
|
||||
|
||||
phi = phiU +
|
||||
(
|
||||
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
fvc::interpolate(interface.sigmaK())
|
||||
*fvc::snGrad(alpha1)*mesh.magSf()
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
Reference in New Issue
Block a user