CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

#sinclude "sampling" in controlDict dictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By snak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2019, 08:09
Default #sinclude "sampling" in controlDict dictionary
  #1
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 7
philiplu is on a distinguished road
Hello,

does someone know what's the objective of

#sinclude "sampling"
in
controlDict dictionary

from the tutorial
$FOAM TUTORIALS/multiphase/interFoam/laminar/damBreak/damBreak

the tutorial-links:
https://develop.openfoam.com/Develop...amBreak/system


thank you in advance
philiplu is offline   Reply With Quote

Old   September 10, 2019, 21:39
Default
  #2
Senior Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 113
Blog Entries: 1
Rep Power: 18
snak is on a distinguished road
Hi

Some info...
https://www.openfoam.com/documentati...y.html#details

https://www.openfoam.com/documentati...y.html#details

The #sinclude directive (and the #includeIfPresent alias) behaves identically to the #include directive, but does not generate an error if the file does not exist.

And, the #include directive for including a file, expects a single string to follow.
salehi144 likes this.
snak is offline   Reply With Quote

Old   September 11, 2019, 07:22
Default thank you
  #3
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 7
philiplu is on a distinguished road
Hello, snak,
thanks for the reply and sure, it helps.

another concern:
literally I guess
#sinclude "sampling"
ONLY samples data during the solving, WITHOUT any impact on solving results...

As I'm not familiar with the OF-background-mechanism yet, so to rephrase my concern:

#sinclude "sampling" won't influence the results, right?



additionally: 1 question, 1 confirmation:

what's "phirb"?


confirmation:
i.e. pressure, if its input unit is e.g. m2/s2, then that of out-coming results stay still in the same unit (m2/s2), put simply
input in e.g. m2/s2
results still in m2/s2
right?



thank you and OF-friends in advance
philiplu is offline   Reply With Quote

Old   September 13, 2019, 05:10
Default
  #4
Senior Member
 
shinji nakagawa
Join Date: Mar 2009
Location: Japan
Posts: 113
Blog Entries: 1
Rep Power: 18
snak is on a distinguished road
Quote:
Originally Posted by philiplu View Post
another concern:
literally I guess
#sinclude "sampling"
ONLY samples data during the solving, WITHOUT any impact on solving results...

As I'm not familiar with the OF-background-mechanism yet, so to rephrase my concern:

#sinclude "sampling" won't influence the results, right?
Yes.
#sinclude itself do nothing. Just copy and paste the content of the file.
In your case (damBreak), "type set" in "sample library" will do its job.
There should be no impact on solving.


Quote:
Originally Posted by philiplu View Post
additionally: 1 question, 1 confirmation:

what's "phirb"?
phirb is related to a compression velocity.
Details are explained in the PhD thesis by Henrik Rusche. It appears in eq.(4.14).
https://spiral.imperial.ac.uk/handle/10044/1/8110


Quote:
Originally Posted by philiplu View Post
confirmation:
i.e. pressure, if its input unit is e.g. m2/s2, then that of out-coming results stay still in the same unit (m2/s2), put simply
input in e.g. m2/s2
results still in m2/s2
right?
Yes.
You can check it by looking the output file itself.
A file wrriten as a result also have a line of "dimensions".
snak is offline   Reply With Quote

Old   September 16, 2019, 01:28
Default thank you, snak
  #5
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 7
philiplu is on a distinguished road
hello, snak,

thanks for your scientifically summarized and clear answers, alleviating my "worry" essentially e.g. that p switches to kgm-1s-2 as output.

as I'm even new i.e. just start, online to post sth, so forgive my further Qs without self-refraining rationally:

Q1:
(still in damBreak case as in preceding posts)
as in the sampling file:
.........................................
sets
(
gauge_1
{
type face;
axis y;
start (0.02 0.20 0.005);
end (0.02 0.25 0.005);
nPoints 100;
}

gauge_2
{
type face;
axis y;
start (0.2 0.03 0.005);
end (0.2 0.55 0.005);
nPoints 100;
.........................................

what's the "nPoints 100"? 100 sample-points between e.g. 0.20-0.25 (0.03-0.55) of y?
anyhow, i checked the output: the output number i.e. number of points are different betwwen gauge_1 and _2 and neither is 100


Q2:
the output-format is vtk, certainly using e.g. python or math-software, even manually excel, the sampling output can be plotted. But paraView must be capable to visualize them.
i tried, individually (in one time step, e.g. one gauge) but without success, so do you or someone knows how to plot them in paraview?

Q3:
still Q2 related, when the time-steps exceeds e.g. 100, how to import them into paraview in batch (if paraview can plot them individually)


thank you and OF-friends in advance


regards
philiplu is offline   Reply With Quote

Old   September 16, 2019, 06:08
Default additional
  #6
Member
 
philip lu
Join Date: Aug 2019
Posts: 87
Rep Power: 7
philiplu is on a distinguished road
hello, snak and OFOAM-friends

after an insight of UserGuide, the "face" (an example as in appendix) states:
"Intersection of specified line and cell faces"

then the "nPoints", i.e. "Number of sampling points" (e.g. =100 here) could be overridden, since

number of intersection won't always coincide with the (randomly decided) "Number of sampling points" (e.g. =100 here), right?


thank you and regards



____________________________
appendix:
.........................................
sets
(
gauge_1
{
type face;
axis y;
start (0.02 0.20 0.005);
end (0.02 0.25 0.005);
nPoints 100;
}
philiplu is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What are dictionaries in Openfoam ? granzer OpenFOAM 3 November 25, 2020 01:47
driftFluxFoam viscosity model modification problem dleduc OpenFOAM Programming & Development 15 October 1, 2018 10:37
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary Struggle_Achieve OpenFOAM Pre-Processing 2 December 20, 2017 04:58
Specifying probe locations in controlDict using dictionary file vincent OpenFOAM Bugs 3 December 31, 2008 05:25
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 09:31.