Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
e6935c52
Commit
e6935c52
authored
Aug 05, 2008
by
Mattijs Janssens
Browse files
Merge branch 'master' of /home/noisy2/OpenFOAM/OpenFOAM-dev
parents
57949f8e
a9b8a507
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
View file @
e6935c52
...
...
@@ -238,8 +238,7 @@ void Foam::kineticTheoryModel::solve()
volScalarField
ThetaSqrt
=
sqrt
(
Theta_
);
// 'thermal' conductivity (Table 3.3, p. 49)
volScalarField
kappa_
=
conductivityModel_
->
kappa
(
alpha
,
Theta_
,
gs0_
,
rhoa_
,
da_
,
e_
);
kappa_
=
conductivityModel_
->
kappa
(
alpha
,
Theta_
,
gs0_
,
rhoa_
,
da_
,
e_
);
// particle viscosity (Table 3.2, p.47)
mua_
=
viscosityModel_
->
mua
(
alpha
,
Theta_
,
gs0_
,
rhoa_
,
da_
,
e_
);
...
...
@@ -351,8 +350,7 @@ void Foam::kineticTheoryModel::solve()
mua_
.
min
(
1.0e+2
);
mua_
.
max
(
0
.
0
);
lambda_
=
(
4
.
0
/
3
.
0
)
*
sqr
(
alpha_
)
*
rhoa_
*
da_
*
gs0_
*
(
1
.
0
+
e_
)
*
ThetaSqrt
/
sqrtPi
;
lambda_
=
(
4
.
0
/
3
.
0
)
*
sqr
(
alpha_
)
*
rhoa_
*
da_
*
gs0_
*
(
1
.
0
+
e_
)
*
ThetaSqrt
/
sqrtPi
;
Info
<<
"kinTheory: max(Theta) = "
<<
max
(
Theta_
).
value
()
<<
endl
;
...
...
applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml
View file @
e6935c52
<ServerManagerConfiguration>
<ProxyGroup
name=
"sources"
>
<SourceProxy
name=
"PV3FoamReader"
class=
"vtkPV3FoamReader"
>
<!-- File name - compulsory -->
<StringVectorProperty
name=
"FileName"
command=
"SetFileName"
number_of_elements=
"1"
>
<FileListDomain
name=
"files"
/>
</StringVectorProperty>
<!-- Time info sent to animation controls (top of window) -->
<DoubleVectorProperty
name=
"TimestepValues"
information_only=
"1"
>
<TimeStepsInformationHelper/>
<Documentation>
Available timestep values.
</Documentation>
</DoubleVectorProperty>
<DoubleVectorProperty
name=
"TimeRange"
information_only=
"1"
>
<TimeRangeInformationHelper/>
</DoubleVectorProperty>
<!-- ExtrapolateWalls check box -->
<IntVectorProperty
name=
"ExtrapolateWalls"
command=
"SetExtrapolateWalls"
number_of_elements=
"1"
default_values=
"0"
>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Include sets check box -->
<IntVectorProperty
name=
"IncludeSets"
command=
"SetIncludeSets"
number_of_elements=
"1"
default_values=
"0"
>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Include zones check box -->
<IntVectorProperty
name=
"IncludeZones"
command=
"SetIncludeZones"
number_of_elements=
"1"
default_values=
"0"
>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Show patch names check box -->
<IntVectorProperty
name=
"ShowPatchNames"
command=
"SetShowPatchNames"
number_of_elements=
"1"
default_values=
"0"
>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Available regions array -->
<StringVectorProperty
name=
"RegionArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"Region"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"RegionStatus"
command=
"SetRegionArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"RegionArrayInfo"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"RegionArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Available volFields array -->
<StringVectorProperty
name=
"VolFieldArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"VolField"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"VolFieldStatus"
command=
"SetVolFieldArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"VolFieldArrayInfo"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"VolFieldArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Available pointFields array -->
<StringVectorProperty
name=
"PointFieldArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"PointField"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"PointFieldStatus"
command=
"SetPointFieldArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"PointFieldArrayInfo"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"PointFieldArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Available Lagrangian fields array -->
<StringVectorProperty
name=
"LagrangianFieldArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"LagrangianField"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"LagrangianFieldStatus"
command=
"SetLagrangianFieldArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"LagrangianFieldArrayInfo"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"LagrangianFieldArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Cache mesh check box -->
<IntVectorProperty
name=
"CacheMesh"
command=
"SetCacheMesh"
number_of_elements=
"1"
default_values=
"1"
>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Update GUI check box -->
<IntVectorProperty
name=
"UpdateGUI"
command=
"SetUpdateGUI"
number_of_elements=
"1"
default_values=
"0"
>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
</SourceProxy>
</ProxyGroup>
<ProxyGroup
name=
"sources"
>
<SourceProxy
name=
"PV3FoamReader"
class=
"vtkPV3FoamReader"
>
<!-- File name - compulsory -->
<StringVectorProperty
name=
"FileName"
command=
"SetFileName"
number_of_elements=
"1"
animateable=
"0"
>
<FileListDomain
name=
"files"
/>
<Documentation>
Specifies the filename for the OpenFOAM Reader.
</Documentation>
</StringVectorProperty>
<!-- Send discrete time info to the animation panel -->
<DoubleVectorProperty
name=
"TimestepValues"
repeatable=
"1"
information_only=
"1"
>
<TimeStepsInformationHelper/>
<Documentation>
Available timestep values.
</Documentation>
</DoubleVectorProperty>
<!-- Send continuous time info to the animation panel -->
<DoubleVectorProperty
name=
"TimeRange"
information_only=
"1"
>
<TimeRangeInformationHelper/>
</DoubleVectorProperty>
<!-- Available Parts (volume, patches, lagrangian) array -->
<StringVectorProperty
name=
"PartArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"Part"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"PartStatus"
label=
"Mesh Parts"
command=
"SetPartArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"PartArrayInfo"
animateable=
"0"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"PartArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Available volFields array -->
<StringVectorProperty
name=
"VolFieldArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"VolField"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"VolFieldStatus"
label=
"Volume Fields"
command=
"SetVolFieldArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"VolFieldArrayInfo"
animateable=
"0"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"VolFieldArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Available Lagrangian fields array -->
<StringVectorProperty
name=
"LagrangianFieldArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"LagrangianField"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"LagrangianFieldStatus"
label=
"Lagrangian Fields"
command=
"SetLagrangianFieldArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"LagrangianFieldArrayInfo"
animateable=
"0"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"LagrangianFieldArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Available pointFields array -->
<StringVectorProperty
name=
"PointFieldArrayInfo"
information_only=
"1"
>
<ArraySelectionInformationHelper
attribute_name=
"PointField"
/>
</StringVectorProperty>
<StringVectorProperty
name=
"PointFieldStatus"
label=
"Point Fields"
command=
"SetPointFieldArrayStatus"
number_of_elements=
"0"
repeat_command=
"1"
number_of_elements_per_command=
"2"
element_types=
"2 0"
information_property=
"PointFieldArrayInfo"
animateable=
"0"
>
<ArraySelectionDomain
name=
"array_list"
>
<RequiredProperties>
<Property
name=
"PointFieldArrayInfo"
function=
"ArrayList"
/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<!-- Extrapolate Walls check-box -->
<IntVectorProperty
name=
"ExtrapolateWalls"
command=
"SetExtrapolateWalls"
number_of_elements=
"1"
default_values=
"0"
animateable=
"0"
>
<BooleanDomain
name=
"bool"
/>
<Documentation>
Extrapolate internalField to wall and empty patches
</Documentation>
</IntVectorProperty>
<!-- Include Sets check-box -->
<IntVectorProperty
name=
"IncludeSets"
command=
"SetIncludeSets"
number_of_elements=
"1"
default_values=
"0"
animateable=
"0"
>
<Documentation>
Searches the polyMesh/sets/ directory
</Documentation>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Include Zones check-box -->
<IntVectorProperty
name=
"IncludeZones"
command=
"SetIncludeZones"
number_of_elements=
"1"
default_values=
"0"
animateable=
"0"
>
<Documentation>
ZoneMesh information is used to find {cell,face,point}Zones.
The polyMesh/ directory is only checked on startup.
</Documentation>
<BooleanDomain
name=
"bool"
/>
</IntVectorProperty>
<!-- Show Patch Names check-box -->
<IntVectorProperty
name=
"ShowPatchNames"
command=
"SetShowPatchNames"
number_of_elements=
"1"
default_values=
"0"
animateable=
"0"
>
<BooleanDomain
name=
"bool"
/>
<Documentation>
Show patch names in render window.
</Documentation>
</IntVectorProperty>
<!-- Cache Mesh check-box -->
<IntVectorProperty
name=
"CacheMesh"
command=
"SetCacheMesh"
number_of_elements=
"1"
default_values=
"1"
animateable=
"0"
>
<BooleanDomain
name=
"bool"
/>
<Documentation>
Cache the fvMesh in memory.
</Documentation>
</IntVectorProperty>
<!-- Update GUI check box -->
<IntVectorProperty
name=
"UpdateGUI"
command=
"SetUpdateGUI"
number_of_elements=
"1"
default_values=
"0"
animateable=
"0"
>
<BooleanDomain
name=
"bool"
/>
<Documentation>
A simple way cause a reader GUI modification.
</Documentation>
</IntVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>
applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx
View file @
e6935c52
...
...
@@ -36,6 +36,7 @@
vtkCxxRevisionMacro
(
vtkPV3FoamReader
,
"$Revision: 1.5$"
);
vtkStandardNewMacro
(
vtkPV3FoamReader
);
#undef EXPERIMENTAL_TIME_CACHING
vtkPV3FoamReader
::
vtkPV3FoamReader
()
{
...
...
@@ -47,23 +48,30 @@ vtkPV3FoamReader::vtkPV3FoamReader()
FileName
=
NULL
;
foamData_
=
NULL
;
output1_
=
NULL
;
output0_
=
NULL
;
// Add second output for the Lagrangian
this
->
SetNumberOfOutputPorts
(
2
);
vtkMultiBlockDataSet
*
lagrangian
;
lagrangian
=
vtkMultiBlockDataSet
::
New
();
lagrangian
->
ReleaseData
();
this
->
GetExecutive
()
->
SetOutputData
(
1
,
lagrangian
);
lagrangian
->
Delete
();
TimeStep
=
0
;
TimeStepRange
[
0
]
=
0
;
TimeStepRange
[
1
]
=
0
;
CacheMesh
=
0
;
CacheMesh
=
1
;
ExtrapolateWalls
=
0
;
IncludeSets
=
0
;
IncludeZones
=
0
;
ShowPatchNames
=
0
;
UpdateGUI
=
1
;
UpdateGUIOld
=
1
;
UpdateGUI
=
0
;
Region
Selection
=
vtkDataArraySelection
::
New
();
Part
Selection
=
vtkDataArraySelection
::
New
();
VolFieldSelection
=
vtkDataArraySelection
::
New
();
PointFieldSelection
=
vtkDataArraySelection
::
New
();
LagrangianFieldSelection
=
vtkDataArraySelection
::
New
();
...
...
@@ -77,7 +85,7 @@ vtkPV3FoamReader::vtkPV3FoamReader()
);
SelectionObserver
->
SetClientData
(
this
);
Region
Selection
->
AddObserver
Part
Selection
->
AddObserver
(
vtkCommand
::
ModifiedEvent
,
this
->
SelectionObserver
...
...
@@ -114,14 +122,20 @@ vtkPV3FoamReader::~vtkPV3FoamReader()
delete
[]
FileName
;
}
RegionSelection
->
RemoveObserver
(
this
->
SelectionObserver
);
if
(
output0_
)
{
output0_
->
Delete
();
}
PartSelection
->
RemoveObserver
(
this
->
SelectionObserver
);
VolFieldSelection
->
RemoveObserver
(
this
->
SelectionObserver
);
PointFieldSelection
->
RemoveObserver
(
this
->
SelectionObserver
);
LagrangianFieldSelection
->
RemoveObserver
(
this
->
SelectionObserver
);
SelectionObserver
->
Delete
();
Region
Selection
->
Delete
();
Part
Selection
->
Delete
();
VolFieldSelection
->
Delete
();
PointFieldSelection
->
Delete
();
LagrangianFieldSelection
->
Delete
();
...
...
@@ -149,38 +163,40 @@ int vtkPV3FoamReader::RequestInformation
return
0
;
}
vtkInformation
*
out
Info
=
outputVector
->
GetInformationObject
(
0
);
int
n
Info
=
outputVector
->
Get
NumberOf
InformationObject
s
();
if
(
!
f
oam
Data_
)
if
(
F
oam
::
vtkPV3Foam
::
debug
)
{
vtkDebugMacro
(
"RequestInformation: creating foamData_"
);
vtkMultiBlockDataSet
*
output
=
vtkMultiBlockDataSet
::
SafeDownCast
(
outInfo
->
Get
(
vtkMultiBlockDataSet
::
DATA_OBJECT
())
);
if
(
Foam
::
vtkPV3Foam
::
debug
)
cout
<<
"RequestInformation with "
<<
nInfo
<<
" item(s)
\n
"
;
for
(
int
infoI
=
0
;
infoI
<
nInfo
;
++
infoI
)
{
cout
<<
"constructed vtkPV3Foam with output: "
;
output
->
Print
(
cout
);
outputVector
->
GetInformationObject
(
infoI
)
->
Print
(
cout
);
}
}
if
(
!
foamData_
)
{
foamData_
=
new
Foam
::
vtkPV3Foam
(
FileName
,
this
);
}
else
{
foamData_
->
U
pdateInfo
rmation
();
foamData_
->
u
pdateInfo
();
}
int
nTimeSteps
=
0
;
double
*
timeSteps
=
foamData_
->
findTimes
(
nTimeSteps
);
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
TIME_STEPS
(),
timeSteps
,
nTimeSteps
);
// set identical time steps for all ports
for
(
int
infoI
=
0
;
infoI
<
nInfo
;
++
infoI
)
{
outputVector
->
GetInformationObject
(
infoI
)
->
Set
(
vtkStreamingDemandDrivenPipeline
::
TIME_STEPS
(),
timeSteps
,
nTimeSteps
);
}
double
timeRange
[
2
];
if
(
nTimeSteps
)
...
...
@@ -190,21 +206,25 @@ int vtkPV3FoamReader::RequestInformation
if
(
Foam
::
vtkPV3Foam
::
debug
>
1
)
{
cout
<<
"nTimeSteps "
<<
nTimeSteps
<<
"
\n
"
;
cout
<<
"timeRange "
<<
timeRange
[
0
]
<<
" to "
<<
timeRange
[
1
]
<<
"
\n
"
;
cout
<<
"nTimeSteps "
<<
nTimeSteps
<<
"
\n
"
<<
"timeRange "
<<
timeRange
[
0
]
<<
" to "
<<
timeRange
[
1
]
<<
"
\n
"
;
for
(
int
i
=
0
;
i
<
nTimeSteps
;
++
i
)
for
(
int
timeI
=
0
;
timeI
<
nTimeSteps
;
++
timeI
)
{
cout
<<
"step["
<<
i
<<
"] = "
<<
timeSteps
[
i
]
<<
"
\n
"
;
cout
<<
"step["
<<
timeI
<<
"] = "
<<
timeSteps
[
timeI
]
<<
"
\n
"
;
}
}
outInfo
->
Set
(
vtkStreamingDemandDrivenPipeline
::
TIME_RANGE
(),
timeRange
,
2