release on 2016-05-18_11-38-54

This commit is contained in:
Christoph Goniva
2016-05-18 11:38:55 +02:00
parent c3a1e3763d
commit e013e0549f
200 changed files with 3358 additions and 3760 deletions

678
COPYING
View File

@ -1,678 +0,0 @@
-------------------------------------------------------------------------
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program 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.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-------------------------------------------------------------------------

View File

@ -1,10 +0,0 @@
Parts of the code uses OpenFOAM® technology. This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.
Detailed information on the OpenFOAM trademark can be found at
- http://www.openfoam.com/legal/trademark-policy.php
- http://www.openfoam.com/legal/trademark-guidelines.php
For further information on OpenCFD and OpenFOAM, please refer to
- http://www.openfoam.com

83
README
View File

@ -1,83 +0,0 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code provides models and solvers to realize coupled CFD-DEM simulations
using LIGGGHTS and OpenFOAM.
Note: this code is not part of OpenFOAM (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
CFDEM® coupling provides an open source parallel coupled CFD-DEM framework
combining the strengths of LIGGGHTS® DEM code and the Open Source
CFD package OpenFOAM®(*). The CFDEM®coupling toolbox allows to expand
standard CFD solvers of OpenFOAM®(*) to include a coupling to the DEM
code LIGGGHTS®. In this toolbox the particle representation within the
CFD solver is organized by "cloud" classes. Key functionalities are organised
in sub-models (e.g. force models, data exchange models, etc.), which can easily
be selected and combined by dictionary settings.
The coupled solvers run fully parallel on distributed-memory clusters.
Features are:
- its modular approach allows users to easily implement new models
- its MPI parallelization enables to use it for large scale problems
- the "forum"_lws on CFD-DEM gives the possibility to exchange with other
users / developers
- the use of GIT allows to easily update to the latest version
- basic documentation is provided
The CFDEM®coupling distribution includes the following files and directories:
- "README" file (this file)
- "LICENSE" file the GNU General Public License (GPL)
- "DISCLAIMER" file
- "src" directory including the source files of the coupling toolbox and models
- "applications" directory including the solver files for coupled CFD-DEM simulations
- "doc" directory including the documentation of CFDEM®coupling
- "tutorials" directory including basic tutorial cases showing the functionality
Details on installation are given on the "www.cfdem.com"
The functionality of this CFD-DEM framwork is described via "tutorial cases" showing
how to use different solvers and models.
CFDEM®coupling stands for Computational Fluid Dynamics (CFD) -
Discrete Element Method (DEM) coupling.
CFDEM®coupling is an open-source code, distributed freely under the terms of the
GNU Public License (GPL).
Core development of CFDEM®coupling is done by
Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012
\*---------------------------------------------------------------------------*/
(*) This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.
\*---------------------------------------------------------------------------*/

View File

@ -1,6 +1,9 @@
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
PFLAGS+= -DCFDEMWMPROJECTVERSION="$(CFDEM_WM_PROJECT_VERSION)"
EXE_INC = \
$(PFLAGS) \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
@ -11,7 +14,8 @@ EXE_INC = \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I$(CFDEM_LIGGGHTS_SRC_DIR)
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
$(CFDEM_ADD_INCOMPTURBMOD_LIBS) \

View File

@ -47,8 +47,11 @@ Contributions
#else
#include "turbulenceModel.H"
#endif
#include "superquadric_flag.h"
#include "cfdemCloudIB.H"
#if defined(SUPERQUADRIC_ACTIVE_FLAG)
#include "cfdemCloudIBSuperquadric.H"
#endif
#include "implicitCouple.H"
#include "averagingModel.H"
@ -89,7 +92,11 @@ int main(int argc, char *argv[])
// create cfdemCloud
#include "readGravitationalAcceleration.H"
cfdemCloudIB particleCloud(mesh);
#if defined(SUPERQUADRIC_ACTIVE_FLAG)
cfdemCloudIBSuperquadric particleCloud(mesh);
#else
cfdemCloudIB particleCloud(mesh);
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,6 +1,9 @@
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
PFLAGS+= -DCFDEMWMPROJECTVERSION="$(CFDEM_WM_PROJECT_VERSION)"
EXE_INC = \
$(PFLAGS) \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
@ -8,6 +11,7 @@ EXE_INC = \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
-I$(CFDEM_LIGGGHTS_SRC_DIR)
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\

View File

@ -46,14 +46,20 @@ Description
#endif
#include "fixedFluxPressureFvPatchScalarField.H"
#include "cfdemCloud.H"
#if defined(anisotropicRotation)
#include "cfdemCloudRotation.H"
#endif
#include "superquadric_flag.h"
#if defined(SUPERQUADRIC_ACTIVE_FLAG)
#include "cfdemCloudRotationSuperquadric.H"
#endif
#include "implicitCouple.H"
#include "clockModel.H"
#include "smoothingModel.H"
#include "forceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
@ -72,6 +78,8 @@ int main(int argc, char *argv[])
#include "readGravitationalAcceleration.H"
#if defined(anisotropicRotation)
cfdemCloudRotation particleCloud(mesh);
#elif defined(SUPERQUADRIC_ACTIVE_FLAG)
cfdemCloudRotationSuperquadric particleCloud(mesh);
#else
cfdemCloud particleCloud(mesh);
#endif
@ -148,8 +156,7 @@ int main(int argc, char *argv[])
#if defined(version30)
while (piso.correct())
#else
int nCorrSoph = nCorr + 5 * pow((1-particleCloud.dataExchangeM().timeStepFraction()),1);
for (int corr=0; corr<nCorrSoph; corr++)
for (int corr=0; corr<nCorr; corr++)
#endif
{
volScalarField rUA = 1.0/UEqn.A();
@ -173,32 +180,6 @@ int main(int argc, char *argv[])
if (modelType=="A")
rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction);
// Update the fixedFluxPressure BCs to ensure flux consistency
#ifndef versionExt32
if (modelType=="A")
{
surfaceScalarField voidfractionf(fvc::interpolate(voidfraction));
setSnGrad<fixedFluxPressureFvPatchScalarField>
(
p.boundaryField(),
(
phi.boundaryField()
- (mesh.Sf().boundaryField() & U.boundaryField())
)/(mesh.magSf().boundaryField()*rUAf.boundaryField()*voidfractionf.boundaryField())
);
}else
{
setSnGrad<fixedFluxPressureFvPatchScalarField>
(
p.boundaryField(),
(
phi.boundaryField()
- (mesh.Sf().boundaryField() & U.boundaryField())
)/(mesh.magSf().boundaryField()*rUAf.boundaryField())
);
}
#endif
// Non-orthogonal pressure corrector loop
#if defined(version30)
while (piso.correctNonOrthogonal())

View File

@ -1,6 +1,9 @@
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
PFLAGS+= -DCFDEMWMPROJECTVERSION="$(CFDEM_WM_PROJECT_VERSION)"
EXE_INC = \
$(PFLAGS) \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \

View File

@ -174,8 +174,7 @@ int main(int argc, char *argv[])
#if defined(version30)
while (piso.correct())
#else
int nCorrSoph = nCorr + 5 * pow((1-particleCloud.dataExchangeM().timeStepFraction()),1);
for (int corr=0; corr<nCorrSoph; corr++)
for (int corr=0; corr<nCorr; corr++)
#endif
{
volScalarField rUA = 1.0/UEqn.A();

View File

@ -1,6 +1,9 @@
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
PFLAGS+= -DCFDEMWMPROJECTVERSION="$(CFDEM_WM_PROJECT_VERSION)"
EXE_INC = \
$(PFLAGS) \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \

View File

@ -164,8 +164,7 @@ int main(int argc, char *argv[])
#if defined(version30)
while (piso.correct())
#else
int nCorrSoph = nCorr + 5 * pow((1-particleCloud.dataExchangeM().timeStepFraction()),1);
for (int corr=0; corr<nCorrSoph; corr++)
for (int corr=0; corr<nCorr; corr++)
#endif
{
volScalarField rUA = 1.0/UEqn.A();

View File

@ -1,6 +1,9 @@
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
PFLAGS+= -DCFDEMWMPROJECTVERSION="$(CFDEM_WM_PROJECT_VERSION)"
EXE_INC = \
$(PFLAGS) \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \

View File

@ -233,12 +233,13 @@ listing below of styles within certain commands.
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel_implicitCouple.html">momCoupleModel_implicitCouple</A></TD><TD ><A HREF = "momCoupleModel_noCouple.html">momCoupleModel_noCouple</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "probeModel.html">probeModel</A></TD><TD ><A HREF = "probeModel_noProbe.html">probeModel_noProbe</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "probeModel_particleProbe.html">probeModel_particleProbe</A></TD><TD ><A HREF = "regionModel.html">regionModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "regionModel_allRegion.html">regionModel_allRegion</A></TD><TD ><A HREF = "smoothingModel.html">smoothingModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "smoothingModel_constDiffSmoothing.html">smoothingModel_constDiffSmoothing</A></TD><TD ><A HREF = "smoothingModel_noSmoothing.html">smoothingModel_noSmoothing</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel.html">voidfractionModel</A></TD><TD ><A HREF = "voidFractionModel_GaussVoidFraction.html">voidfractionModel_GaussVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_IBVoidFraction.html">voidfractionModel_IBVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_bigParticleVoidFraction.html">voidfractionModel_bigParticleVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_centreVoidFraction.html">voidfractionModel_centreVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_dividedVoidFraction.html">voidfractionModel_dividedVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_noVoidFraction.html">voidfractionModel_noVoidFractionVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_trilinearVoidFraction.html">voidfractionModel_trilinearVoidFraction</A>
<TR ALIGN="center"><TD ><A HREF = "regionModel_allRegion.html">regionModel_allRegion</A></TD><TD ><A HREF = "scalarTransportModel.html">scalarTransportModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "smoothingModel.html">smoothingModel</A></TD><TD ><A HREF = "smoothingModel_constDiffSmoothing.html">smoothingModel_constDiffSmoothing</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "smoothingModel_noSmoothing.html">smoothingModel_noSmoothing</A></TD><TD ><A HREF = "voidFractionModel.html">voidfractionModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_GaussVoidFraction.html">voidfractionModel_GaussVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_IBVoidFraction.html">voidfractionModel_IBVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_bigParticleVoidFraction.html">voidfractionModel_bigParticleVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_centreVoidFraction.html">voidfractionModel_centreVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_dividedVoidFraction.html">voidfractionModel_dividedVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_noVoidFraction.html">voidfractionModel_noVoidFractionVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_trilinearVoidFraction.html">voidfractionModel_trilinearVoidFraction</A>
</TD></TR></TABLE></DIV>
</HTML>

Binary file not shown.

View File

@ -17,12 +17,15 @@
twoWayFilesProps
{
couplingFilename "filename";
maxNumberOfParticles number;
maxNumberOfParticles scalar1;
DEMts scalar2;
};
</PRE>
<UL><LI><I>filename</I> = filename of the VTK file series
<LI><I>number</I> = maximum number of particles in DEM simulation
<LI><I>scalar1</I> = maximum number of particles in DEM simulation
<LI><I>scalar2</I> = DEM time step width
</UL>

View File

@ -20,10 +20,19 @@
ArchimedesProps
{
gravityFieldName "gravity";
twoDimensional;
suppressProbe switch1;
treatForceDEM switch2;
};
</PRE>
<UL><LI><I>gravity</I> = name of the finite volume gravity field
<LI><I>twoDimensional</I> = optional keyword for conducting a two dimensional calculation
<LI><I>switch1</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>switch2</I> = (optional, default true) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
</UL>
<P><B>Examples:</B>

View File

@ -21,12 +21,18 @@ ArchimedesIBProps
{
gravityFieldName "gravity";
voidfractionFieldName "voidfraction";
twoDimensional;
treatForceExplicit switch1;
};
</PRE>
<UL><LI><I>gravity</I> = name of the finite volume gravity field
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
<LI><I>twoDimensional</I> = optional keyword for conducting a two dimensional calculation
<LI><I>switch1</I> = (optional, default true) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
</UL>
<P><B>Examples:</B>

View File

@ -20,12 +20,48 @@
DiFeliceDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation switch1;
voidfractionInterpolationType "type1";
UInterpolationType "type2";
suppressProbe switch2;
scale scalar1;
scaleDrag scalar2;
treatForceExplicit switch3;
implForceDEM switch4;
verbose switch5;
scalarViscosity switch6;
nu scalar3;
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>switch1</I> = flag to use interpolated voidfraction and velocity values (normally off)
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
<LI><I>Us</I> = name of the finite volume granular velocity field
<LI><I>switch1</I> = (optional, normally off) flag to use interpolated voidfraction and velocity values
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for voidfraction field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for velocity field
<LI><I>switch2</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>scalar1</I> = (optional) scaling of particle diameter
<LI><I>scalar2</I> = (optional) scaling of drag law
<LI><I>switch3</I> = sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch4</I> = sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch5</I> = sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch6</I> = sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar3</I> = optional, only if switch6 is true
</UL>

View File

@ -22,9 +22,20 @@ GidaspowDragProps
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
phi "scalar";
phi scalar1;
interpolation switch1;
implForceDEM switch2;
voidfractionInterpolationType "type1"
UInterpolationType "type2"
implForceDEM switch2;
suppressProbe switch3;
scale scalar2;
scaleDrag scalar3;
switchingVoidfraction scalar4;
treatForceExplicit switch4;
implForceDEM switch5;
verbose switch6;
scalarViscosity switch7;
nu scalar5;
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
@ -33,11 +44,33 @@ GidaspowDragProps
<LI><I>Us</I> = name of the finite volume cell averaged particle velocity field
<LI><I>phi</I> = drag correction factor (in doubt 1)
<LI><I>scalar1</I> = drag correction factor (in doubt 1)
<LI><I>switch1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>switch1</I> = (optional, default off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for voidfraction field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for velocity field
<LI><I>switch2</I> = (optional, default false) flag to use implicit formulation of drag on DEM side:l
<I>switch3</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>scalar2</I> = (optional) scaling of particle diameter
<LI><I>scalar3</I> = (optional) scaling of drag law
<LI><I>scalar4</I> = (optional) voidfraction above which dilute formulation will be used
<LI><I>switch4</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch5</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch6</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch7</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar5</I> = (optional, default false) optional, only if switch6 is true
<I>switch2</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
</UL>
<P><B>Examples:</B>

View File

@ -21,17 +21,50 @@ KochHillDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation "bool1";
implForceDEM "bool2";
granVelFieldName "Us"
interpolation "switch1";
voidfractionInterpolationType "type1"
UInterpolationType "type2"
implForceDEM "switch2";
suppressProbe "switch3";
scale "scalar1";
scaleDrag "scalar2";
treatForceExplicit "switch4";
verbose "switch5";
implForceDEMaccumulated "switch6";
scalarViscosity "switch7";
nu "scalar3";
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
<LI><I>bool1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>Us</I> = (optional) name of finite volume granular velocity field
<LI><I>switch1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for voidfraction field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for velocity field
<LI><I>switch2</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
<I>switch3</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>scalar1</I> = (optional) scaling of particle diameter
<LI><I>scalar2</I> = (optional) scaling of drag law
<LI><I>switch4</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch5</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch6</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch7</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar3</I> = optional, only if switch7 is true
<I>bool2</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
</UL>
<P><B>Examples:</B>

View File

@ -24,10 +24,17 @@ LaEuScalarTempProps
voidfractionFieldName "voidfraction";
partTempName "Temp";
partHeatFluxName "convectiveHeatFlux";
lambda value;
Cp value1;
interpolation "switch1";
verbose "switch2";
partHeatTransCoeffName "heatTransCoeff";
partHeatFluidName "heatFluid";
lambda scalar1;
Cp scalar2;
interpolation switch1;
TInterpolationType "type1"
verbose switch2;
maxSource scalar3;
scale scalar4;
scalarViscosity switch3;
nu scalar5;
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
@ -40,13 +47,26 @@ LaEuScalarTempProps
<LI><I>convectiveHeatFlux</I> = name of the DEM data representing the particle-fluid convective heat flux
<LI><I>value</I> = fluid thermal conductivity [W/(m*K)]
<LI><I>heatTransCoeff</I> = name of heat transfer coefficient
<LI><I>value1</I> = fluid specific heat capacity [W*s/(kg*K)]
<LI><I>heatFluid</I> =
<I>scalar1</I> = fluid thermal conductivity [W/(m*K)]
<LI><I>scalar2</I> = fluid specific heat capacity [W*s/(kg*K)]
<LI><I>switch1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>switch2</I> = (normally off) for verbose run
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for T field
<LI><I>switch2</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar3</I> = (optional) limit maximal turbulence
<LI><I>scalar4</I> = scaling of particle diameter
<LI><I>switch3</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar5</I> = optional, only if switch3 is true
</UL>

View File

@ -21,8 +21,13 @@ MeiLiftProps
{
velFieldName "U";
useSecondOrderTerms;
interpolation "switch1";
verbose "switch2";
interpolation switch1;
vorticityInterpolationType "type1"
UInterpolationType "type2"
verbose switch2;
treatForceExplicit switch3;
scalarViscosity switch4;
nu scalar1;
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
@ -31,8 +36,18 @@ MeiLiftProps
<LI><I>switch1</I> = switch to activate tri-linear interpolation of the flow quantities at the particle position
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for vorticity field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for velocity field
<LI><I>switch2</I> = switch to activate the report of per-particle quantities to the screen
<LI><I>switch3</I> = (optional, default true) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch4</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar1</I> = optional, only if switch4 is true
</UL>
<P><B>Examples:</B>

View File

@ -20,10 +20,24 @@
SchillerNaumannDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation "bool1";
voidfractionInterpolationType "type1"
UInterpolationType "type2"
implForceDEM "bool2";
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
<LI><I>bool1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for voidfraction field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for velocity field
<I>bool2</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
</UL>
<P><B>Examples:</B>

View File

@ -20,12 +20,24 @@
ShirgaonkarIBProps
{
velFieldName "U";
pressureFieldName "pressure";
pressureFieldName "p";
twoDimensional;
depth scalar1;
verbose switch1;
treatForceExplicit switch2;
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>pressure</I> = name of the finite volume pressure field
<LI><I>p</I> = name of the finite volume pressure field
<LI><I>twoDimensional</I> = optional keyword for conducting a two dimensional calculation
<LI><I>scalar1</I> = optional, only necessary if twoDimensional is active
<LI><I>switch1</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch2</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
</UL>

View File

@ -30,7 +30,7 @@ fieldTimeAverageProps
);
};
</PRE>
<UL><LI><I>time</I> = time to start temporal averaging
<UL><LI><I>time</I> = (optional) time to start temporal averaging
<LI><I>scalarField</I> = names of the finite volume scalar fields to be temporally averaged

View File

@ -21,7 +21,12 @@ gradPForceProps
{
pFieldName "pressure";
velocityFieldName "U";
interpolation switch1;
interpolation switch1;
gradPInterpolationType "type1"
useAddedMass scalar1;
suppressProbe switch2;
treatForceExplicit switch3;
treatForceDEM switch4;
};
</PRE>
<UL><LI><I>pressure</I> = name of the finite volume fluid pressure field
@ -30,6 +35,16 @@ gradPForceProps
<LI><I>switch1</I> = flag to use interpolated pressure values (normally off)
<LI><I>type1</I> = (optional, default cellPointFace) interpolation type for grad(p) field
<LI><I>useAddedMass</I> = (optional) coefficient of added mass accounted for
<LI><I>switch2</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>switch3</I> = (optional, default true) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch4</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
</UL>
<P><B>Examples:</B>

View File

@ -18,6 +18,22 @@
noDrag
);
</PRE>
<P>noDragProps
{
noDEMForce;
keepCFDForce;
treatForceExplicit switch1;
}
</P>
<UL><LI>noDragProps are optional.
<I>noDEMForce</I> = optional
<LI><I>keepCFDForce</I> = optional
<LI><I>switch1</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
</UL>
<P><B>Examples:</B>
</P>
<PRE>forceModels
@ -27,12 +43,13 @@
</PRE>
<PRE>noDragProps (optional)
{
noDEMForce; (optional)
noDEMForce; (optional, default false) do not apply the previously calculated forces in DEM integration
keepCFDForce; (optional, default false) do not delete the previously calculated forces and use them in CFD source terms
};
</PRE>
<P><B>Description:</B>
</P>
<P>The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. The noDrag model sets the forces acting on the particle to zero. If several force models are selected and noDrag is the last model being executed, the fluid particle force will be set to zero. If the variable noDEMForce is set, then the forces communicated to the DEM solver are also set to zero.
<P>The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. The noDrag model sets the forces acting on the particle (which were previously caclulated) to zero. If several force models are selected and noDrag is the last model being executed, the fluid particle force will be set to zero. If the variable noDEMForce is set, then the forces communicated to the DEM solver are also set to zero.
</P>
<P><B>Restrictions:</B>
</P>

View File

@ -21,17 +21,17 @@ particleVolumeProps
{
verbose switch1;
writeToFile switch2;
scale number1;
startTime number2;
scale scalar1;
startTime scalar2;
};
</PRE>
<UL><LI><I>switch1</I> = (optional, default true) switch for output to screen
<UL><LI><I>switch1</I> = (optional, default false) switch for output to screen
<LI><I>switch2</I> = (optional, default true) switch for output to file
<LI><I>number1</I> = (optional, default 1) scaling of the particle volume d=dSphere/scale
<LI><I>scalar1</I> = (optional, default 1) scaling of the particle volume d=dSphere/scale
<LI><I>number2</I> = (optional, default 0) start time of volume calculation and output
<LI><I>scalar2</I> = (optional, default 0) start time of volume calculation and output
</UL>

View File

@ -20,6 +20,8 @@
scalarGeneralExchangeProps
{
useLiMason "switch1"; //default: DeenEtAl
useGeneralCorrelation "switch3"; //default: DeenEtAl
generalCorrelationParameters (1 2 3 4 5 6 7 8);
verbose "switch2";
velFieldName "U";
voidfractionFieldName "voidfraction";
@ -53,12 +55,25 @@ scalarGeneralExchangeProps
(
value2
);
interpolation "bool1";
voidfractionInterpolationType "type1"
UInterpolationType "type2"
fluidScalarFieldInterpolationType "type2"
scalarViscosity switch5;
nu scalar5;
suppressProbe switch6;
scale scalar6;
maxSource scalar7;
}
</PRE>
<UL><LI><I>switch1</I> = (optional) flag to use Nusselt correlations of Li and Mason (2000)
<LI><I>switch2</I> = (normally off) for verbose run
<LI><I>switch3</I> = (optional) flag to use a general Nusselt number correlation (must specify parameters of this correlation in a list called 'generalCorrelationParameters' )
<LI>generalCorrelationParameters = list with a predefined number of parameters (for length see src code, only read if useGeneralCorrelation is set to true)
<LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
@ -87,6 +102,24 @@ scalarGeneralExchangeProps
<LI><I>value2</I> = molecular diffusion coefficient [m^2/s]
<LI><I>bool1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
<LI><I>type1</I> = (optional, default cellPoint) interpolation type for voidfraction field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for velocity field
<LI><I>type3</I> = (optional, default cellPoint) interpolation type for fluidScalarField field
<LI><I>switch5</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar5</I> = (optional) optional, only if switch5 is true
<LI><I>switch6</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>scalar7</I> = (optional) scaling of particle diameter
<LI><I>scalar7</I> = limit maximal turbulence
</UL>
<P><B>Examples:</B>
@ -98,6 +131,13 @@ scalarGeneralExchangeProps
scalarGeneralExchangeProps
{
useLiMason false; //default: DeenEtAl
useGeneralCorrelation true; //default: DeenEtAl
generalCorrelationParameters
(
7.0 -10 5
1.0 0.17
1.33 -2.31 1.16
);
verbose false;
velFieldName "U";
voidfractionFieldName "voidfraction";
@ -149,6 +189,9 @@ fluid-particle mass, momentum and heat transfer in dense gas-solid flows.
Chemical Engineering Science 116 (2014) 710-724.
This correlation is based on that of Gunn (1978).
</P>
<P>The switch 'useGeneralCorrelation' allows one to specify the parameters
of the Gunn correlation as a list called 'generalCorrelationParameters'.
</P>
<P>Alternatively, the correclation of
Li and Mason (2000), A computational investigation of transient heat
transfer in pneumatic transport of granular particles, Pow.Tech 112

View File

@ -20,10 +20,34 @@
virtualMassForceProps
{
velFieldName "U";
phiFieldName "phi";
splitUrelCalculation switch1;
Cadd scalar1;
treatForceExplicit switch2;
treatForceDEM switch3;
interpolation switch4;
UInterpolationType "type1"
DDtUInterpolationType "type2"
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>phi</I> = name of the finite volume flux field
<LI><I>switch1</I> = indicator to split calculation of Urel between CFDEM and LIGGGHTS
<LI><I>scalar1</I> = scalar value
<LI><I>switch2</I> = (optional, default true) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch3</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch4</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>type1</I> = (optional, default cellPointFace) interpolation type for U field
<LI><I>type2</I> = (optional, default cellPointFace) interpolation type for ddt(U) field
</UL>
<P><B>Examples:</B>

View File

@ -20,12 +20,33 @@
viscForceProps
{
velocityFieldName "U";
interpolation "switch";
useAddedMass scalar1;
suppressProbe switch1;
treatForceExplicit switch2;
treatForceDEM switch3;
interpolation switch4;
divTauInterpolationType "type1";
scalarViscosity switch5;
nu scalar2;
};
</PRE>
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
<LI><I>switch</I> = flag to use interpolated stress values (normally off)
<LI><I>scalar1</I> = (optional) coefficient of added mass accounted for
<LI><I>switch1</I> = (optional, default false) can be used to suppress the output of the probe model
<LI><I>switch2</I> = (optional, default true) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch3</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>switch4</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>type1</I> = (optional, default cellPointFace) interpolation type for div(Tau) field
<LI><I>switch5</I> = (optional, default false) sub model switch, see <A HREF = "forceSubModel.html">forceSubModel</A> for details
<LI><I>scalar2</I> = optional, only if switch5 is true
</UL>

View File

@ -28,19 +28,31 @@ volWeightedAverageProps
(
vectorField
);
upperThreshold value;
lowerThreshold value2;
upperThreshold scalar1;
lowerThreshold scalar2;
useVolumeFraction switch0;
volumeFractionName word1;
verbose ;
writeToFile switch1;
};
</PRE>
<UL><LI><I>time</I> = time to start the averaging (default 0)
<UL><LI><I>time</I> = (optional, default 0.) time to start the averaging
<LI><I>scalarField</I> = names of the finite volume scalar fields to be temporally averaged
<LI><I>vectorField</I> = names of the finite volume vector fields to be temporally averaged
<LI><I>value</I> = only cells with a field value (magnitude) lower than this upper threshold are considered
<LI><I>scalar1</I> = only cells with a field value (magnitude) lower than this upper threshold are considered
<LI><I>value2</I> = only cells with a field value (magnitude) greater than this lower threshold are considered
<LI><I>scalar2</I> = only cells with a field value (magnitude) greater than this lower threshold are considered
<LI><I>switch0</I> = (optional, default false) consider a volume fraction for the calculation
<LI><I>word1</I> = (optional, default "voidfraction") name of the volume fraction, only used if useVolumeFraction is true
<LI><I>verbose</I> = (optional, default false) keyword only (mostly used for debugging)
<LI><I>switch1</I> = (optional, default false) switch for the output.
</UL>

View File

@ -46,4 +46,25 @@
</P>
<P><B>Default:</B> none.
</P>
<P><B>Swtiches:</B>
</P>
<UL><LI>Depending on the availability within the respective force model, a number of switches can be activated:
<LI>treatForceExplicit: switch for the purely explicit consideration of the force term in the equation of motion on the CFD side (if switched off, the force is considered semi-implicitly)
</UL>
<UL><LI>treatForceDEM: switch for the consideration of the forces on the DEM side only
</UL>
<UL><LI>implForceDEM: If true, the fluid velocity and drag coefficient are communicated to the DEM calculation at each coupling time step and the drag force is calculated at each DEM time step, using the current particle velocity. If false, a force term is communiated to the DEM calculation at each coupling time step, the term is not within a coupling interval.
</UL>
<UL><LI>verbose: switch for debug output to screen
</UL>
<UL><LI>interpolation: switch for the usage of interpolation models when getting data for the Lagrangian calculation from Eulerian fields; If false, the cell centre values are used.
</UL>
<UL><LI>useFilteredDragModel: switch for using a coarse-grid version of the Beetstra drag model (takes grid-size effects into account; default = off)
</UL>
<UL><LI>useParcelSizeDependentFilteredDrag: switch for using a coarse-grid version of the Beetstra drag model (takes parcel-size effects into account, will force the switch useFilteredDragModel to "on"; default = off)
</UL>
<UL><LI>implForceDEMaccumulated: Can only be used in combination with implForceDEM switch, drag force values of each DEM time step are accumulated and passed on to the CFD-calculation.
</UL>
<UL><LI>scalarViscosity: switch for the usage of a user-defined viscosity nu for the calculation of the drag force; The CFD calculation always uses the value of the transport model.
</UL>
</HTML>

View File

@ -9,6 +9,16 @@
<HR>
<H3>githubAccess_public
@ -17,14 +27,16 @@
<P><B>Description:</B>
</P>
<P>This routine describes how to set up a github account and pull repositories of the CFDEM(R)project.
After setting some environment variables LIGGGHTS(R) and CFDEM(R)coupling can be compiled
<P>This routine describes how to pull repositories of the CFDEM(R)project from <A HREF = "http://github.com">github.com</A>.
After setting some environment variables, LIGGGHTS(R) and CFDEM(R)coupling can be compiled.
</P>
<P><B>Procedure:</B>
</P>
<P>Basically the following steps have to be performed:
</P>
<UL><LI><I>git clone</I> the desired repository
<UL><LI><I>git clone</I> and setup OpenFOAM
<LI><I>git clone</I> the desired repositories
<LI>update your repositories by <I>git pull</I>
@ -36,35 +48,85 @@ After setting some environment variables LIGGGHTS(R) and CFDEM(R)coupling can be
</UL>
<P><B><I>git clone</I> the desired repository:</B>
<P><B><I>git clone</I> and setup OpenFOAM:</B>
</P>
<P>Have a look at the latest compatible OpenFOAM(R)-version in the versionInfo.H file at <A HREF = "https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC/blob/master/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H">github</A>.
This file will later be downloaded as a part of the source-code.
Look for the git commit hashtag in the following line:
</P>
<PRE>word OFversion="&lt;OF-Release&gt;-commit-&lt;commitHashtag&gt;";
</PRE>
<PRE>e.g. word OFversion="2.4.x-commit-3d8da0e960c717ff582f1517a27724144f086b83";
</PRE>
<P>However sometimes even newer versions are supported, please check the <A HREF = "http://www.cfdem.com/node/414">release notes</A> and the "Advanced Settings"-section.
</P>
<P>Basically follow the OpenFOAM(R) git compilation <A HREF = "http://openfoam.org/download/git.php">instructions</A>, with a small number of exceptions:
</P>
<P>When you git clone the repository, replace the release-version with &lt;OF-Release&gt;.
</P>
<P>with git-protocol:
</P>
<PRE>git clone git://github.com/OpenFOAM/OpenFOAM-&lt;OF-Release&gt;.git
</PRE>
<P>or with https:
</P>
<PRE>git clone https://github.com/OpenFOAM/OpenFOAM-&lt;OF-Release&gt;.git
</PRE>
<P>Now change into the new directory and checkout the correct compatible version:
</P>
<PRE>cd OpenFOAM-&lt;OF-Release&gt;
git checkout &lt;commitHashtag&gt;
</PRE>
<P>The result will be a status report, that indicates a 'detached head state'.
Now continue with installing and compiling OpenFOAM(R).
Make sure that OpenFOAM(R) works properly with a parallel Simulation!
</P>
<P>If you want to use an older OpenFOAM(R)-version, please have a look at the "Backwards Compatibility"-section.
</P>
<P><B><I>git clone</I> the desired repositories:</B>
</P>
<P>You may want to take a look around on CFDEMproject on github: github.com/CFDEMproject_gitCFDEM
</P>
<P>If not already done, open a terminal and create a directory for LIGGGHTS(R) in $HOME:
</P>
<PRE>cd
</PRE>
<PRE>mkdir LIGGGHTS
</PRE>
<PRE>cd LIGGGHTS
<PRE>cd
mkdir LIGGGHTS
cd LIGGGHTS
</PRE>
<P>To clone the public LIGGGHTS repository, open a terminal and execute:
with git-protocol:
</P>
<PRE><H6>git clone git://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git LIGGGHTS-PUBLIC
</H6></PRE>
<PRE>git clone git://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git LIGGGHTS-PUBLIC
</PRE>
<P>or with https:
</P>
<PRE>git clone https://github.com/CFDEMproject/LIGGGHTS-PUBLIC.git LIGGGHTS-PUBLIC
</PRE>
<P>If not already done, open a terminal and create a directory for CFDEM(R)coupling in $HOME:
</P>
<PRE>cd
<PRE>cd
mkdir CFDEM
cd CFDEM
</PRE>
<PRE>mkdir CFDEM
</PRE>
<PRE>cd CFDEM
</PRE>
<P>Make sure that OpenFOAM(R) is already set up correctly!
</P>
<P>To clone the public CFDEM(R)coupling repository, open a terminal and execute:
with git-protocol:
</P>
<PRE><H6>git clone git://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
</H6></PRE>
<P>Troubles? See Troubleshooting section below.
<PRE>git clone git://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
</PRE>
<P>or with https:
</P>
<PRE>git clone https://github.com/CFDEMcoupling-PUBLIC.git CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
</PRE>
<PRE>Additionally the lpp tool for converting LIGGGHTS dump-files into the paraview readable VTK-format might be of use:
with git-protocol:
git clone git://github.com:CFDEMproject/LPP.git $HOME/LIGGGHTS/mylpp
</PRE>
<PRE>or with https:
git clone https://github.com:CFDEMproject/LPP.git $HOME/LIGGGHTS/mylpp
</PRE>
<P>Please have a look at README and INSTALL.txt in the root directory of LPP for further information.
</P>
<P>Troubles? See Troubleshooting git section below.
</P>
<P><B>Update your repositories by <I>git pull</I>:</B>
</P>
@ -81,7 +143,7 @@ git pull
</P>
<PRE>gedit ~/.bashrc &
</PRE>
<P>add the lines (you find them also in .../cfdemParticle/etc/bashrc and cshrc respectively):
<P>add the lines (you find them also in CFDEMCoupling-$WM_PROJECT_VERSION/src/lagrangian/cfdemParticle/etc/bashrc and cshrc respectively):
</P>
<PRE>#================================================#
#- source cfdem env vars
@ -95,12 +157,15 @@ export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials
export CFDEM_PROJECT_USER_DIR=$HOME/CFDEM/$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION
export CFDEM_bashrc=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc
export CFDEM_LIGGGHTS_SRC_DIR=$HOME/LIGGGHTS/LIGGGHTS-PUBLIC/src
export CFDEM_LIGGGHTS_MAKEFILE_NAME=ubuntuVTK_fpic
export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic
export CFDEM_LPP_DIR=$HOME/LIGGGHTS/mylpp/src
export CFDEM_PIZZA_DIR=$HOME/LIGGGHTS/PIZZA/gran_pizza_17Aug10/src
. $CFDEM_bashrc
#================================================#
</PRE>
<P>If you installed LIGGGHTS(R) or CFDEM(R)coupling in non-standard paths, please have a look at least at CFDEM_PROJECT_DIR and CFDEM_LIGGGHTS_SRC_DIR.
The standard CFDEM_LIGGGHTS_MAKEFILE_NAME is fedora_fpic, which works on most systems. However please checkout LIGGGHTS-PUBLIC/src/MAKE for additional makefiles, wich are available. The most used ones are fedora_fpic and ubuntuVTK_fpic. Beware that the CFDEMcoupling needs a fpic compilation to use LIGGGHTS as a library. Please check the "Advanced Settings" for VTK information.
</P>
<P>Save the ~/.bashrc, open a new terminal and test the settings. The commands:
</P>
<PRE>$CFDEM_PROJECT_DIR
@ -127,6 +192,10 @@ $CFDEM_LIGGGHTS_SRC_DIR
</P>
<PRE>cfdemCompCFDEM
</PRE>
<P>or compile both at once with:
</P>
<PRE>cfdemCompCFDEMall
</PRE>
<P>You can run the tutorial cases by executing .../etc/testTutorial.sh through the alias <I>cfdemTestTUT</I>.
Alternatively you can run each tutorial using the <I>Allrun.sh</I> scripts in the tutorial directories.
</P>
@ -147,8 +216,11 @@ Changes in $CFDEM_TUT_DIR will be lost after every <I>git stash</I>!
</P>
<PRE>cd $HOME/LIGGGHTS
</PRE>
<PRE>git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/lpp mylpp
</PRE>
<P>with git-protocol:
git clone git://github.com/CFDEMproject/LPP.git
with https:
git clone https://github.com/CFDEMproject/LPP.git
</P>
<P><B>Backwards Compatibility:</B>
</P>
<P>Basically CFDEM(R)coupling supports one OpenFOAM(R) version therefore all settings are prepared for that. Nevertheless we try to maintain backwards compatibility as long as it works with reasonable effort.
@ -160,16 +232,42 @@ src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H
(still not all functionality might work then!)
</P>
<P><B>Troubleshooting:</B>
<P><B>Advanced Settings:</B>
</P>
<P>Here some advanced settings and hints for non-standard compilations are presented.
As stated in the "Backwards Compatibility"-section, there are compiler flags for different OpenFOAM versions. Checkout src/lagrangian/cfdemParticle/etc/OFversion/OFversion.H for compatibility settings. Just comment the current "#define version2X" in the top-section and uncomment the one you want to compile it with.
</P>
<P>There are advanced compilation settings for library-paths, includes and libraries are within the additionalLibs file in src/lagrangian/cfdemParticle/etc/additionalLibs. There are predefined files for different OpenFOAM versions. To use a different version, add the following lines to your .bashrc (.cshrc) before the standard CFDEM variables:
</P>
<PRE>export CFDEM_ADD_LIBS_DIR=FOLDER_OF_NEW_additionalLibs_FILE/
</PRE>
<PRE>export CFDEM_ADD_LIBS_NAME=additionalLibs30x
</PRE>
<P>This is an example to use a predefined additionalLibs file for OpenFOAM-3.0.x.
</P>
<P>To enable direct VTK-dump (dump custom/vtk) support of LIGGGHTS and CFDEMcoupling, you have to install the VTK libraries. Either 5.8 or 6 are predefined for ubuntu.
</P>
<PRE>sudo apt-get libvtk5.8 libvtk5-dev
</PRE>
<P>Change "export CFDEM_LIGGGHTS_MAKEFILE_NAME=fedora_fpic" in your .bashrc according to your preferred LIGGGHTS makefile.
If you have a non-standard installation location you have to adapt the LIGGGHTS makefile accordingly.
To enable this feature in a coupled run the additionalLibs file has to be modified.
It basically needs to include the same libraries as the LIGGGHTS-Makefile.
E.g. for Ubuntu-14.04 with vtk-5.8:
</P>
<PRE>CFDEM_ADD_LIB_PATHS = -L/usr/include/vtk-5.8
</PRE>
<PRE>CFDEM_ADD_LIBS = -lvtkCommon -lvtkFiltering -lvtkIO
</PRE>
<P><B>Troubleshooting git:</B>
</P>
<UL><LI>Troubles with git clone?
</UL>
<P><B>a)</B> The git protocol will not work if your computer is behind a firewall which blocks the relevant TCP port, you can use alternatively (write command in one line):
<P><B>a)</B> The git protocol will not work if your computer is behind a firewall which blocks the relevant TCP port, you can use alternatively https instead of git (write command in one line):
</P>
<P>git clone https://user@github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git
CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
<P>git clone https://github.com/CFDEMproject/CFDEMcoupling-PUBLIC.git CFDEMcoupling-PUBLIC-$WM_PROJECT_VERSION
</P>
<P><B>b)</B> If you face the error: "error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed while accessing https://github.com/...",
</P>

Binary file not shown.

View File

@ -20,13 +20,14 @@
readLiggghtsDataProps0
{
startIndex "scalar1";
exactTiming "bool1";
verbose ;
exactTiming ;
filePath
(
"word"
);
runFirst "bool2";
runEveryCouplingStep "bool3";
runFirst "bool1";
runEveryCouplingStep "bool2";
startTime "scalar2";
endTime "scalar3";
timeInterval "scalar4";
@ -34,13 +35,15 @@ readLiggghtsDataProps0
</PRE>
<UL><LI><I>scalar1</I> = start index of data file to be read
<LI><I>bool1</I> = true if start time should be kept even during a coupling interval
<LI><I>verbose</I> = (default off) flag for verbose run
<LI><I>exactTiming</I> = flag indicating that start time should be kept even during a coupling interval
<LI><I>filePath</I> = path to LIGGGHTS data file. Each word in a new line, numbers and symbols need special treatment (e.g. $couplingInterval will be replaced by correct coupling interval in the simulation)
<LI><I>bool2</I> = true if to be run at first timestep only (prio 1)
<LI><I>bool1</I> = true if to be run at first timestep only (prio 1)
<LI><I>bool3</I> = true if to be run at every coupling step (prio 2)
<LI><I>bool2</I> = true if to be run at every coupling step (prio 2)
<LI><I>scalar2</I> = if bool2 and bool3 false then starts at scalar2 (prio 3) run

View File

@ -22,6 +22,7 @@ engineIBProps
}
zSplit value1;
xySplit value2;
checkPeriodicCells;
}
</PRE>
<UL><LI><I>switch1</I> = names of the finite volume scalar fields to be temporally averaged
@ -30,6 +31,8 @@ engineIBProps
<LI><I>value2</I> = number of satellite points in each layer
<LI><I>checkPeriodicCells</I> = (optional, default false) flag for considering the minimal distance to all periodic images of this particle
</UL>
<P><B>Examples:</B>

View File

@ -39,7 +39,7 @@ explicitCoupleProps
</PRE>
<P><B>Description:</B>
</P>
<P>The explicitCouple-model is a momCoupleModel model providing an explicit momentum source term for the CFD solver.
<P>The explicitCouple-model is a momCoupleModel model providing an explicit momentum source term for the CFD solver and additionally it superposes an additional source field which can be set via the function setSourceField.
</P>
<P><B>Restrictions:</B>
</P>

View File

@ -20,6 +20,8 @@
myForceModel3
};
</PRE>
<P>probeModel off;
</P>
<P><B>Examples:</B>
</P>
<PRE>probeModel off;

View File

@ -13,18 +13,22 @@
</P>
<P>To be activated via couplingProperties dictionary.
</P>
<PRE>forceModels
<P>forceModels
(
myForceModel1
myForceModel2
myForceModel3
);
particleProbeProps
</P>
<P>probeModel particleProbe;
</P>
<PRE>particleProbeProps
{
particleIDsToSample (ID1 ID2 ID3 ...); //list of particleIDs to sample
verboseToFile; //main switch
verbose; //currently not used
printEvery xEvery; //print every this many CFD time steps
printEvery xEvery; //print every this many CFD time steps
printOnlyAtStep xStep; //print only at this CFD time step (overrides "printEvery")
sampleAll; //Activate sampling for all particles
probeDebug; //probes additional fields
includePosition; //will include particle position in the output file
@ -41,6 +45,8 @@ particleProbeProps
<LI><I>xEvery</I> = integer to specify the interval for sampling (default = 1, i.e., probing occurs every CFD time step).
<LI><I>xStep</I> = integer to specify the step for sampling (default = deactivated, i.e., it will print accordingly to "printEvery").
<LI><I>sampleAll</I> = switch to activate sampling of all particles. Otherwise (default) only particles specified via "particleIDsToSample" in the couplingProperties dictionary will be sampled.
<LI><I>probeDebug</I> = switch to activate probing of debug properties of secondary importance (specific for each force model).

View File

@ -0,0 +1,89 @@
<HTML>
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
</CENTER>
<HR>
<H3>scalarTransportModel command
</H3>
<P><B>Syntax:</B>
</P>
<P>Defined in scalarTransportProperties dictionary. A variety of derived classes exist that implement different physics of the scalarTransportModel. Here, the most general one, i.e., 'generalManual' is discussed. If no scalar transport shall be used, use the model 'none'.
</P>
<PRE>generalManualProps
{
phiFieldName <I>phiName</I>;
voidfractionFieldName <I>voidfractionName</I>;
ScT <I>scalar1</I>;
PrT <I>scalar2</I>;
cpVolumetric <I>scalar3</I>;
cpVolumetricFieldName <I>word1</I>;
rhoMixFieldName <I>word2</I>;
eulerianFields
(
<I>C</I>
<I>T</I>
);
</PRE>
<PRE>}
</PRE>
<UL><LI><I>phiName</I> = (optional) name of the surface field for the SUPERFICIAL flux, default "phi".
<LI><I>voidfractionName</I> = (optional) name of the finite volume voidfraction field, default "voidfraction".
<LI><I>scalar1</I> = (optional, default 0.7) turbulent Schmidt Nr, set to large value to suppress turbulent species transport
<LI><I>scalar2</I> = (optional, default 0.7) turbulent Prandtl Nr, set to large value to suppress turbulent heat transport
<LI><I>scalar3</I> = (optional, alternatively define word1) volumetric heat capacity as a global constant (in contrast to cpVolumetricFieldName for a field). This is the mixture density times the heat capacity <B>J/K/(m_voidspace)^3</B>, will only be used if cpVolumetricFieldName, or updateMixtureProperties = false
<LI><I>word1</I> = (optional, alternatively define scalar3) volumetric heat capacity as a field
<LI><I>word3</I> = mixture density field
<LI><I>C</I> = concentration field name
<LI><I>T</I> = temperature field name
</UL>
<P><B>Examples:</B>
</P>
<PRE>generalManualProps
{
phiFieldName "phi";
ScT 0.7;
PrT 0.7;
cpVolumetric 1196;
rhoMixFieldName "rhoMix";
eulerianFields
(
C
T
);
</PRE>
<PRE> fvOptionsC
{
};
</PRE>
<PRE> fvOptionsT
{
};
</PRE>
<PRE>}
</PRE>
<P><B>Description:</B>
</P>
<P>Solves the advection-dispersion transport equation for a dilute scalar quantity in the fluid phase. fvOptions can be specified to model sources, etc. in the fluid phase. Exchange models with a particle phase can be included by including appropriate forceModels in couplingProperties.
</P>
<P><B>Restrictions:</B>
The user MUST ensure the "phi" field is SUPERFICIAL (i.e., the fluid-phase velocity times voidfraction interpolatedat the cells' faces). The code cannot know or check whether this is the case, so the user of a certain solver has to ensure this.
</P>
<P><B>Related commands:</B>
</P>
<P>none.
</P>
</HTML>

View File

@ -20,6 +20,7 @@ constDiffSmoothingProps
upperLimit number2;
smoothingLength lengthScale;
smoothingLengthReferenceField lengthScaleRefField;
verbose;
}
</PRE>
<UL><LI><I>number1</I> = scalar fields will be bound to this lower value
@ -30,6 +31,8 @@ constDiffSmoothingProps
<LI><I>lengthScaleRefField</I> = length scale over which reference fields (e.g., the average particle velocity) will be smoothed out. Should be always larger than lengthScale. If not specified, will be equal to lengthScale.
<LI><I>verbose</I> = (optional, default false) flag for debugging output
</UL>
<P><B>Examples:</B>

View File

@ -55,6 +55,6 @@ GaussProps
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A> , <A HREF = "voidFractionModel_bigParticleVoidFraction.html">bigParticle</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A> , <A HREF = "voidFractionModel_bigParticleVoidFraction.html">bigParticle</A>
</P>
</HTML>

View File

@ -19,6 +19,7 @@ IBProps
maxCellsPerParticle number1;
alphaMin number2;
scaleUpVol number3;
checkPeriodicCells ;
}
</PRE>
<UL><LI><I>number1</I> = maximum number of cells covered by a particle (search will fail when more than <I>number1</I> cells are covered by the particle)
@ -27,6 +28,8 @@ IBProps
<LI><I>number3</I> = diameter of the particle's representation is artificially increased according to <I>number3</I> * Vparticle, volume remains unaltered!
<LI><I>checkPeriodicCells</I> = (optional, default false) flag for considering the minimal distance to all periodic images of this particle
</UL>
<P><B>Examples:</B>
@ -51,6 +54,6 @@ IBProps
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A>
</P>
</HTML>

View File

@ -57,6 +57,6 @@ bigParticleProps
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A>
</P>
</HTML>

View File

@ -45,6 +45,6 @@ centreProps
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A>
</P>
</HTML>

View File

@ -20,6 +20,8 @@ dividedProps
interpolation;
weight number2;
porosity number3;
verbose;
cfdemUseOnly;
}
</PRE>
<UL><LI><I>number1</I> = minimum limit for voidfraction
@ -30,6 +32,10 @@ dividedProps
<LI><I>number3</I> = (optional) diameter of the particle's representation is artificially increased according to <I>number2</I> * Vparticle, volume remains unaltered!
<LI><I>verbose</I> = (optional, default false) flag for debugging output
<LI><I>cfdemUseOnly</I> = optional flag, default false
</UL>
<P><B>Examples:</B>
@ -55,6 +61,6 @@ The void fraction calculation is based on a three-step approach (reset, set and
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A>
</P>
</HTML>

View File

@ -27,6 +27,6 @@
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A>
</P>
</HTML>

View File

@ -39,6 +39,6 @@ trilinearProps
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "voidfractionModel.html">voidfractionModel</A>
<P><A HREF = "voidFractionModel.html">voidfractionModel</A>
</P>
</HTML>

View File

@ -5,7 +5,7 @@ scalarTransportModel/newScalarTransportModel.C
temperatureModel/temperatureModel.C
generalManual/generalManual.C
noTransport/noTransport.C
/*generalPhaseChange/generalPhaseChange.C*/
generalPhaseChange/generalPhaseChange.C
/*Fields*/
eulerianScalarField/eulerianScalarField.C

View File

@ -1,12 +1,20 @@
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
GIT_VERSION := $(shell git describe --dirty --always --tags)
PFLAGS+= -DGITVERSION=\"$(GIT_VERSION)\"
PFLAGS+= -DDEBUGFLAG=\"$(DEBUG)\"
PFLAGS+= -DCFDEMWMPROJECTVERSION="$(CFDEM_WM_PROJECT_VERSION)"
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
EXE_INC = \
$(PFLAGS) \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
@ -15,7 +23,5 @@ LIB_LIBS = \
$(CFDEM_ADD_INCOMPTURBMOD_LIBS) \
-lincompressibleTransportModels \
-lfiniteVolume \
-l$(CFDEM_LIB_NAME) \
-lfvOptions \
-lmeshTools \
-lsampling \

View File

@ -88,8 +88,10 @@ eulerianScalarField::eulerianScalarField
),
0.0*mSource_ /( m_ + dimensionedScalar("dummy", m_.dimensions(), 1e-32) ) //initi with zero
),
fieldType_("undefined"),
fvOptions_(sm.mesh())
fieldType_("undefined")
#ifndef versionExt32
,fvOptions_(sm.mesh())
#endif
{
@ -108,8 +110,9 @@ eulerianScalarField::eulerianScalarField
<< endl;
}
#ifndef versionExt32
fvOptions_.reset(dict.subDict("fvOptions"+fieldName_));
#endif
if( (cpVolumetricFieldName_=="na"||!updateMixtureProperties_) && cpVolumetric_<=0.0)
FatalError <<"You did not specify a cpVolumetricFieldName (or you do not updateMixtureProperties) and also cpVolumetric is zero (or negative)! Either provide the field name, or set cpVolumetric to a reasonable value. \n"
@ -124,8 +127,20 @@ eulerianScalarField::eulerianScalarField
if(speciesID_>-1 && updateMixtureProperties_ && (rhoCarrier_<=0 || cpCarrier_<=0) )
FatalError <<"You like to update the phase properties, but density and cp of the carrier phase are not specified or zero \n"
<< abort(FatalError);
//Report options for cp
if(fieldType_=="temperature")
{
if(cpVolumetric_!=0.0 && cpVolumetricFieldName_!="na")
FatalError <<"eulerianScalarField:: You have specified 'cpVolumetric' and 'cpVolumetricFieldName' in a dictionary in '/constant'. This might be confusing. Please unset one of these two inputs to avoid confusion. \n"
<< abort(FatalError);
if(cpVolumetricFieldName_=="na" || !updateMixtureProperties_) //use also if mixture properties are not updated
Info << "eulerianScalarField:: will use the following FIXED VOLUMETRIC HEAT CAPACITY: "
<< cpVolumetric_ << " [J/K/m³]" << endl;
else
Info << "eulerianScalarField:: will use the a SPATIALLY-VARAIBLE VOLUMETRIC HEAT CAPACITY with name: " << cpVolumetricFieldName_ << endl;
}
}
@ -218,7 +233,7 @@ void eulerianScalarField::update(surfaceScalarField phi, volScalarField voidfrac
fvm::ddt(voidfraction, m_) //This is the material derivative in a modified form
- fvm::Sp(fvc::ddt(voidfraction), m_) //Needed since phi is (U_face * voidfraction)!
+ fvm::div(phi, m_, divScheme)
+ fvm::div(phi, m_, divScheme) //This phi must be SUPERFICIAL! (i.e., U_face * voidfraction)!
- fvm::Sp(fvc::div(phi), m_)
==
@ -226,12 +241,15 @@ void eulerianScalarField::update(surfaceScalarField phi, volScalarField voidfrac
fvm::laplacian(nuEff/Sc*voidfraction, m_, laplacianScheme)
+ mSource_
+ fvm::Sp(mSourceKImpl_, m_)
#ifndef versionExt32
+ fvOptions_(m_)
#endif
);
mEqn.relax();
#ifndef versionExt32
fvOptions_.constrain(mEqn);
#endif
mEqn.solve();

View File

@ -31,7 +31,9 @@ Description
#include "cfdemCloud.H"
#include "forceModel.H"
#ifndef versionExt32
#include "fvOptionList.H"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -76,7 +78,9 @@ protected:
mutable word fieldType_;
#ifndef versionExt32
mutable fv::optionList fvOptions_;
#endif
int speciesID_;

View File

@ -48,6 +48,8 @@ generalManual::generalManual
:
scalarTransportModel(dict,sm),
propsDict_(dict.subDict(typeName + "Props")),
phiFieldName_(propsDict_.lookupOrDefault<word>("phiFieldName", "phi")),
voidfractionFieldName_(propsDict_.lookupOrDefault<word>("voidfractionFieldName", "voidfraction")),
eulerianFieldList_(propsDict_.lookup("eulerianFields")),
ScT_(0.7),
PrT_(0.7),
@ -56,7 +58,7 @@ generalManual::generalManual
rhoMix_
( IOobject
(
propsDict_.lookup("rhoMixFieldName"),
propsDict_.lookupOrDefault<word>("rhoMixFieldName","rhoMixDefault"),
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::NO_READ,
@ -68,7 +70,7 @@ generalManual::generalManual
cpRho_
( IOobject
(
propsDict_.lookup("cpVolumetricFieldName"),
propsDict_.lookupOrDefault<word>("cpVolumetricFieldName","cpRhoDefault"),
sm.mesh().time().timeName(),
sm.mesh(),
IOobject::NO_READ,
@ -82,7 +84,7 @@ generalManual::generalManual
propsDict_.readIfPresent("ScT", ScT_);
propsDict_.readIfPresent("PrT", PrT_);
Info << "Using ScT = " << ScT_ << " and PrT " << PrT_ << endl;
Info << "generalManual:: Using the following turbulent dispersion coefficients: ScT = " << ScT_ << " and PrT " << PrT_ << endl;
eulerianFields_ = new autoPtr<eulerianScalarField>[eulerianFieldList_.size()];
for (int i=0;i<eulerianFieldList_.size();i++)
@ -103,7 +105,9 @@ generalManual::generalManual
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
generalManual::~generalManual()
{}
{
delete [] eulerianFields_;
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -113,9 +117,12 @@ void generalManual::createFields()
// ************************************************************
void generalManual::setSources()
{
//Loop through all eulerian fields and
//Loop through all Eulerian fields and and set fields
for (int i=0;i<eulerianFieldList_.size();i++)
eulerianScalarF(i).pullCloudFields();
//Send Sources to External Code (i.e., Lagrangian arrays handled by LIGGGHTS)
particleCloud_.giveUSERdata();
}
// ************************************************************
@ -125,7 +132,7 @@ void generalManual::evolveFields()
if(updateMixtureProperties_)
{
if(eulerianScalarF(0).fieldType()=="Temperature" )
FatalError <<"generalManual: first eulerianField is temperatur, but we need a species. Please re-order your eulerianFields in the input dict. \n"
FatalError <<"generalManual: first eulerianField is temperature, but we need a species. Please re-order your eulerianFields in the input dict. \n"
<< abort(FatalError);
forAll(rhoMix_.internalField(), iter)
@ -153,8 +160,8 @@ void generalManual::evolveFields()
//==============================
// get references
const surfaceScalarField& phi(particleCloud_.mesh().lookupObject<surfaceScalarField> ("phi"));
const volScalarField& voidfraction(particleCloud_.mesh().lookupObject<volScalarField> ("voidfraction"));
const surfaceScalarField& phi(particleCloud_.mesh().lookupObject<surfaceScalarField> (phiFieldName_));
const volScalarField& voidfraction(particleCloud_.mesh().lookupObject<volScalarField> (voidfractionFieldName_));
//==============================
//Loop through all eulerian fields and update them
@ -197,6 +204,7 @@ const eulerianScalarField& generalManual::eulerianTemperatureF()
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -47,6 +47,10 @@ protected:
dictionary propsDict_;
word phiFieldName_;
word voidfractionFieldName_;
const wordList eulerianFieldList_;
autoPtr<eulerianScalarField>* eulerianFields_;
@ -60,7 +64,8 @@ protected:
//Extra fields to represent a mixture in the void space
bool updateMixtureProperties_; // switch to indicate whether phase properties will be updated or not
volScalarField rhoMix_; //field (if needed) to hold mixture density
volScalarField cpRho_; //field (if needed) to hold volumetric cp-value
volScalarField cpRho_; //field (if needed) to hold volumetric cp-value
public:
@ -99,6 +104,8 @@ public:
volScalarField& sourceField(int i);
};

View File

@ -0,0 +1,109 @@
/*---------------------------------------------------------------------------*\
License
This 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.
This code 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 this code. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2014- Stefan Radl, TU Graz, Austria
\*---------------------------------------------------------------------------*/
#include "generalPhaseChange.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(generalPhaseChange, 0);
addToRunTimeSelectionTable
(
scalarTransportModel,
generalPhaseChange,
dictionary
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
generalPhaseChange::generalPhaseChange
(
const dictionary& dict,
cfdemCloud& sm
)
:
generalManual(dict,sm),
phaseChangeDict_(propsDict_.subDict("PhaseChangeParameters")),
phaseChangeModelList_(phaseChangeDict_.lookup("phaseChangeModels"))
{
phaseChangeModels_ = new autoPtr<phaseChangeModel>[phaseChangeModelList_.size()];
for (int i=0;i<phaseChangeModelList_.size();i++)
{
phaseChangeModels_[i] = phaseChangeModel::New
(
phaseChangeDict_,
sm,
phaseChangeModelList_[i],
i
);
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
generalPhaseChange::~generalPhaseChange()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void generalPhaseChange::createFields()
{}
// ************************************************************
void generalPhaseChange::update()
{
//Re-set the sources due to particle-fluid interactions
generalManual::setSources();
//Apply the phaseChange operation (loop through list of models)
//phaseChangeModels must ADD any sources to the eulerianScalarFields
//(since there might be sources due to particle-fluid interactions)
const volScalarField& voidfraction(particleCloud_.mesh().lookupObject<volScalarField> (voidfractionFieldName_));
for (int i=0;i<phaseChangeModelList_.size();i++)
{
int idFieldFrom = phaseChangeModelRef(i).fromID();
int idFieldTo = phaseChangeModelRef(i).toID();
phaseChangeModelRef(i).update(voidfraction, eulerianTemperatureF().m(),
eulerianScalarF(idFieldFrom), eulerianScalarF(idFieldTo));
phaseChangeModelRef(i).setEnthalpySource(eulerianTemperatureF());
}
//to stuff for standard scalar transport
generalManual::evolveFields();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
const phaseChangeModel& generalPhaseChange::phaseChangeModelRef(int i)
{
return phaseChangeModels_[i];
}
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,91 @@
/*---------------------------------------------------------------------------*\
License
This 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.
This code 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 this code. If not, see <http://www.gnu.org/licenses/>.
Copyright (C) 2015 -Stefan Radl, TU Graz, Austria
Description
Derived from generalManual transport Model
Evolves an arbitrary number of scalar quantities, exchanges sources
with the granular phase, and implements phase-change physics
between the Eulerian phases
\*---------------------------------------------------------------------------*/
#ifndef generalPhaseChange_H
#define generalPhaseChange_H
#include "generalManual.H"
#include "forceModel.H"
#include "phaseChangeModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class generalPhaseChange Declaration
\*---------------------------------------------------------------------------*/
class generalPhaseChange
:
public generalManual
{
protected:
dictionary phaseChangeDict_;
const wordList phaseChangeModelList_;
autoPtr<phaseChangeModel>* phaseChangeModels_;
public:
//- Runtime type information
TypeName("generalPhaseChange");
// Constructors
//- Construct from components
generalPhaseChange
(
const dictionary& dict,
cfdemCloud& sm
);
// Destructor
~generalPhaseChange();
//Access function
const phaseChangeModel& phaseChangeModelRef(int); //must be const to satisfy compiler!
// Member Functions
void createFields();
void update();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -20,6 +20,7 @@ License
#include "error.H"
#include "phaseChangeModel.H"
#include "IOmanip.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -79,13 +80,12 @@ phaseChangeModel::phaseChangeModel
alphaImExSplit_(dict_.lookupOrDefault<scalar>("alphaImExSplit", 0.5)),
cpFromField_(0.0),
cpToField_(0.0),
deltaHEvap_("deltaHEvap", dimLength*dimLength/dimTime/dimTime, 1),
tEvap_("tEvap", dimTime, 1)
deltaHEvap_(dict_.lookup("deltaHEvap")),
tEvap_(dict_.lookup("tEvap")),
verboseDiskIntervall_(-1), //zero or negative--> deaktivate output to disk
verboseDiskCounter_(0),
sPtr_(NULL)
{
deltaHEvap_ = dict_.lookup("deltaHEvap");
tEvap_ = dict_.lookup("tEvap");
if(parameterVap_.size()<5)
FatalError <<"phaseChangeModel: parameterVap_.size()<5! Provide more parameters to this model. \n"
<< abort(FatalError);
@ -93,6 +93,14 @@ phaseChangeModel::phaseChangeModel
if(alphaImExSplit_<0 || alphaImExSplit_>1)
FatalError <<"alphaImExSplit must be between 0 and 1. \n"
<< abort(FatalError);
if(dict_.found("verboseDiskIntervall"))
verboseDiskIntervall_=readScalar(dict_.lookup("verboseDiskIntervall"));
if (verboseDiskIntervall_>0)
{
Info << "phaseChangeModel will report to disk with intervall " << verboseDiskIntervall_ << endl;
initialzeSummation(typeName, "phaseChange.logDat");
}
}
@ -108,6 +116,7 @@ void phaseChangeModel::update(const volScalarField& voidfraction, //this
{
//To implement phase change model updates that directly affect "fromField", and "toField"
//MUST ADD to sources (not reset sources!)
//MUST be per m³ TOTAL volume, since scalar transport solver is based on this
//update the saturation field and cp quantities
cpFromField_ = fromField.cpCarrier();
@ -117,13 +126,14 @@ void phaseChangeModel::update(const volScalarField& voidfraction, //this
mSaturation_.internalField()[iter] = pVapor( temp.internalField()[iter] ) / temp[iter] / Rvap_;
//update the reference quantities
volScalarField tempF = 1.0 / (
volScalarField tempF = voidfraction
/ (
fromField.m()
+ toField.m() * fromField.rho() / toField.rho()
+ fromField.rho() / fromField.rhoCarrier()
); //phi_liquid ... (global) liquid volume fraction
//divided by fromField.m()
); //phi_liquid ... (global) liquid volume fraction (per m³ total!)
//divided by fromField.m()
//leaving mass rate - implicit/explicit term (divided by fromFiel.m())
fromField.mSource().internalField() -= (1-alphaImExSplit_) * tempF.internalField() * fromField.m().internalField()
@ -145,6 +155,7 @@ void phaseChangeModel::update(const volScalarField& voidfraction, //this
tempF *= fromField.m() / tEvap_.value(); //phi_liquid ... (global) liquid volume fraction
//divided by evaporation time scale
//entering mass rate - explicit & implicit term
toField.mSource().internalField() += tempF * mSaturation_.internalField();
toField.mSourceKImpl().internalField()-= tempF * toField.rhoCarrier();
@ -156,8 +167,11 @@ void phaseChangeModel::update(const volScalarField& voidfraction, //this
- toField.m().internalField()
* toField.rhoCarrier()
);
if(verboseToDisk())
computeIntegral(mSource_);
}
//************************************************
void phaseChangeModel::setEnthalpySource(const eulerianScalarField& Temperature) const
{
//update the heat source
@ -168,6 +182,61 @@ void phaseChangeModel::setEnthalpySource(const eulerianScalarField& Temperature)
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void phaseChangeModel::initialzeSummation(word typeName, word logFileName) const
{
if (Pstream::master())
{
fileName file_ =logFileName;
fileName probeDir;
fileName probeSubDir = typeName;
Info << "Integral quantity for model " << typeName << " will write to file " << file_ << endl;
if (particleCloud_.mesh().name() != polyMesh::defaultRegion)
{
probeSubDir = probeSubDir/particleCloud_.mesh().name();
}
probeSubDir = "postProcessing"/probeSubDir/particleCloud_.mesh().time().timeName();
if (Pstream::parRun())
{
// Put in undecomposed case
// (Note: gives problems for distributed data running)
probeDir = particleCloud_.mesh().time().path()/".."/probeSubDir;
}
else
{
probeDir = particleCloud_.mesh().time().path()/probeSubDir;
}
// Create directory if does not exist.
mkDir(probeDir);
sPtr_ = new OFstream(probeDir+"/"+file_);
*sPtr_ << '#'
<< "Time" << " "
<< "sourceValue" << endl;
}
}
//*******************************************************************
void phaseChangeModel::computeIntegral(volScalarField& explicitEulerSource) const
{
scalar integralValue = gSum( explicitEulerSource.internalField()
*explicitEulerSource.mesh().V()
);
if (Pstream::master() )
{
*sPtr_ << setprecision(IOstream::defaultPrecision()) ;
*sPtr_ << particleCloud_.mesh().time().value()
<< " " //setw(IOstream::defaultPrecision() + 6)
<< integralValue
<< endl;
}
}
} // End namespace Foam

View File

@ -30,8 +30,12 @@ Description
#include "cfdemCloud.H"
#include "forceModel.H"
#ifndef versionExt32
#include "fvOptionList.H"
#endif
#include "eulerianScalarField.H"
#include "generalManual.H"
#include "OFstream.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
@ -73,7 +77,27 @@ protected:
dimensionedScalar deltaHEvap_; //units: K; deltaHEvap = deltaH_v / cp_g
dimensionedScalar tEvap_; //units: s; tEvap_ = d_d^2 / (6*Sh*D_Vapor)
//Reporting
mutable int verboseDiskIntervall_;
mutable int verboseDiskCounter_;
mutable OFstream* sPtr_;
inline bool verboseToDisk() const
{
if(verboseDiskIntervall_<=0) return false;
verboseDiskCounter_++;
if(verboseDiskCounter_>=verboseDiskIntervall_)
{
verboseDiskCounter_=0;
return true;
}
else
return false;
};
//Private/protected member functions
inline double pVapor(double T) const
@ -149,6 +173,8 @@ public:
void setEnthalpySource(const eulerianScalarField&) const;
void bound(autoPtr<phaseChangeModel>*) const {};
void initialzeSummation(word typeName, word logFileName) const;
void computeIntegral (volScalarField& explicitEulerSource) const;
// Access
inline volScalarField& mSource() const {return mSource_;}; //returns the source

View File

@ -1,124 +0,0 @@
cfdemCloud = cfdemCloud
cfdTools = cfdTools
forceModels = subModels/forceModel
forceSubModels = subModels/forceModel/forceSubModels
IOModels = subModels/IOModel
voidFractionModels = subModels/voidFractionModel
locateModels = subModels/locateModel
meshMotionModels = subModels/meshMotionModel
momCoupleModels = subModels/momCoupleModel
regionModels = subModels/regionModel
dataExchangeModels = subModels/dataExchangeModel
averagingModels = subModels/averagingModel
clockModels = subModels/clockModel
liggghtsCommandModels = subModels/liggghtsCommandModel
smoothingModels = subModels/smoothingModel
probeModels = subModels/probeModel
$(cfdemCloud)/cfdemCloud.C
derived/cfdemCloudIB/cfdemCloudIB.C
$(cfdTools)/IOtools/json/json.C
$(cfdTools)/global.C
$(cfdTools)/newGlobal.C
$(forceModels)/forceModel/forceModel.C
$(forceModels)/forceModel/newForceModel.C
$(forceModels)/noDrag/noDrag.C
$(forceModels)/checkCouplingInterval/checkCouplingInterval.C
$(forceModels)/DiFeliceDrag/DiFeliceDrag.C
$(forceModels)/fieldStore/fieldStore.C
$(forceModels)/GidaspowDrag/GidaspowDrag.C
$(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C
$(forceModels)/Archimedes/Archimedes.C
$(forceModels)/ArchimedesIB/ArchimedesIB.C
$(forceModels)/interface/interface.C
$(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C
$(forceModels)/KochHillDrag/KochHillDrag.C
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
$(forceModels)/virtualMassForce/virtualMassForce.C
$(forceModels)/gradPForce/gradPForce.C
$(forceModels)/viscForce/viscForce.C
$(forceModels)/MeiLift/MeiLift.C
$(forceModels)/particleCellVolume/particleCellVolume.C
$(forceModels)/particleVolume/particleVolume.C
$(forceModels)/scalarGeneralExchange/scalarGeneralExchange.C
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
$(forceModels)/volWeightedAverage/volWeightedAverage.C
$(forceSubModels)/forceSubModel/newForceSubModel.C
$(forceSubModels)/forceSubModel/forceSubModel.C
$(forceSubModels)/ImEx/ImEx.C
$(probeModels)/probeModel/probeModel.C
$(probeModels)/probeModel/newProbeModel.C
$(probeModels)/noProbe/noProbe.C
$(IOModels)/IOModel/IOModel.C
$(IOModels)/IOModel/newIOModel.C
$(IOModels)/noIO/noIO.C
$(IOModels)/basicIO/basicIO.C
$(IOModels)/trackIO/trackIO.C
$(IOModels)/sophIO/sophIO.C
$(voidFractionModels)/voidFractionModel/voidFractionModel.C
$(voidFractionModels)/voidFractionModel/newVoidFractionModel.C
$(voidFractionModels)/centreVoidFraction/centreVoidFraction.C
$(voidFractionModels)/dividedVoidFraction/dividedVoidFraction.C
$(voidFractionModels)/bigParticleVoidFraction/bigParticleVoidFraction.C
$(voidFractionModels)/GaussVoidFraction/GaussVoidFraction.C
$(voidFractionModels)/IBVoidFraction/IBVoidFraction.C
$(voidFractionModels)/trilinearVoidFraction/trilinearVoidFraction.C
$(voidFractionModels)/noVoidFraction/noVoidFraction.C
$(locateModels)/locateModel/locateModel.C
$(locateModels)/locateModel/newLocateModel.C
$(locateModels)/standardSearch/standardSearch.C
$(locateModels)/engineSearch/engineSearch.C
$(locateModels)/engineSearchIB/engineSearchIB.C
$(meshMotionModels)/meshMotionModel/meshMotionModel.C
$(meshMotionModels)/meshMotionModel/newMeshMotionModel.C
$(meshMotionModels)/noMeshMotion/noMeshMotion.C
$(momCoupleModels)/momCoupleModel/momCoupleModel.C
$(momCoupleModels)/momCoupleModel/newMomCoupleModel.C
$(momCoupleModels)/explicitCouple/explicitCouple.C
$(momCoupleModels)/implicitCouple/implicitCouple.C
$(momCoupleModels)/noCouple/noCouple.C
$(regionModels)/regionModel/regionModel.C
$(regionModels)/regionModel/newRegionModel.C
$(regionModels)/allRegion/allRegion.C
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C
$(dataExchangeModels)/twoWayFiles/twoWayFiles.C
$(dataExchangeModels)/noDataExchange/noDataExchange.C
$(dataExchangeModels)/twoWayMPI/twoWayMPI.C
$(averagingModels)/averagingModel/averagingModel.C
$(averagingModels)/averagingModel/newAveragingModel.C
$(averagingModels)/dilute/dilute.C
$(averagingModels)/dense/dense.C
$(clockModels)/clockModel/clockModel.C
$(clockModels)/clockModel/newClockModel.C
$(clockModels)/standardClock/standardClock.C
$(clockModels)/noClock/noClock.C
$(liggghtsCommandModels)/liggghtsCommandModel/liggghtsCommandModel.C
$(liggghtsCommandModels)/liggghtsCommandModel/newLiggghtsCommandModel.C
$(liggghtsCommandModels)/execute/execute.C
$(liggghtsCommandModels)/runLiggghts/runLiggghts.C
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
$(liggghtsCommandModels)/readLiggghtsData/readLiggghtsData.C
$(smoothingModels)/smoothingModel/smoothingModel.C
$(smoothingModels)/smoothingModel/newSmoothingModel.C
$(smoothingModels)/noSmoothing/noSmoothing.C
$(smoothingModels)/constDiffSmoothing/constDiffSmoothing.C
LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME)

View File

@ -1,33 +0,0 @@
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
GIT_VERSION := $(shell git describe --dirty --always --tags)
PFLAGS+= -DGITVERSION=\"$(GIT_VERSION)\"
PFLAGS+= -DDEBUGFLAG=\"$(DEBUG)\"
include $(CFDEM_ADD_LIBS_DIR)/$(CFDEM_ADD_LIBS_NAME)
EXE_INC = \
$(PFLAGS) \
$(PINC) \
-I ./cfdemParticle \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \
$(CFDEM_ADD_INCOMPTURBMOD_PATHS) \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/OpenFOAM/containers/HashTables/labelHashSet \
-I$(CFDEM_LIGGGHTS_SRC_DIR) \
-I$(CFDEM_SRC_DIR)/cfdTools \
LIB_LIBS = \
$(PLIBS) \
-L$(CFDEM_LIB_DIR) \
-lfiniteVolume \
$(CFDEM_ADD_INCOMPTURBMOD_LIBS) \
-lmeshTools \
-llagrangian \
-L$(CFDEM_LIGGGHTS_SRC_DIR) \
-Wl,--whole-archive -l$(CFDEM_LIGGGHTS_LIB_NAME) -Wl,--no-whole-archive \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_STATICLIBS)

View File

@ -34,7 +34,7 @@ Description
\*---------------------------------------------------------------------------*/
{
volScalarField contErr( fvc::div(phiGes) + fvc::ddt(voidfraction) );
volScalarField contErr( fvc::div(phi) + particleCloud.ddtVoidfraction() );
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright (C) 1991-2009 OpenCFD Ltd.
Copyright (C) 2012- DCS Computing GmbH,Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
Global
continuityErrs
Description
Calculates and prints the continuity errors.
The code is an evolution of continuityErrs.H in OpenFOAM(R) 2.1.x,
where additional functionality for CFD-DEM coupling is added.
\*---------------------------------------------------------------------------*/
{
volScalarField contErr( fvc::div(phi*voidfractionf) + particleCloud.ddtVoidfraction() );
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();
scalar globalContErr = runTime.deltaTValue()*
contErr.weightedAverage(mesh.V()).value();
cumulativeContErr += globalContErr;
Info<< "time step continuity errors : sum local = " << sumLocalContErr
<< ", global = " << globalContErr
<< ", cumulative = " << cumulativeContErr
<< endl;
}
// ************************************************************************* //

View File

@ -58,9 +58,9 @@ inline void outerProduct(double *vec1, double *vec2, double **m)
{
int i, j;
//debug output
for( i = 0; i < 3; ++i )
// for( i = 0; i < 3; ++i )
// printf("OUTER PRODUCT: Input: vec1 element %d = %g", i, vec1[i]);
for( i = 0; i < 3; ++i )
// for( i = 0; i < 3; ++i )
// printf("OUTER PRODUCT: Input: vec2 element %d=%g", i, vec2[i]);
//calculation
@ -272,7 +272,6 @@ inline bool doubleDotTensor333Tensor33(double tensor333[3][3][3],
return true;
}
}; //end of namespace
#endif

View File

@ -0,0 +1,8 @@
//create PISO object
pisoControl piso(mesh);
//create lables
label nCorr = piso.nCorrPISO();
label nNonOrthCorr = piso.nNonOrthCorr();
bool momentumPredictor = piso.momentumPredictor();

View File

@ -0,0 +1 @@
alphaInterpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("alphaInterpolationType",word("cellPoint")),alpha_).ptr());

View File

@ -0,0 +1 @@
DDtUInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("DDtUInterpolationType",word("cellPointFace")),DDtU_).ptr());

View File

@ -0,0 +1 @@
dSauterInterpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("dSauterInterpolationType",word("cellPoint")),dSauter_).ptr());

View File

@ -0,0 +1 @@
divTauInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("divTauInterpolationType",word("cellPointFace")),divTau_).ptr());

View File

@ -0,0 +1 @@
fluidScalarFieldInterpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("fluidScalarFieldInterpolationType",word("cellPoint")),fluidScalarField_).ptr());

View File

@ -0,0 +1 @@
gradAlphaInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("gradAlphaInterpolationType",word("cellPointFace")),gradAlpha_).ptr());

View File

@ -0,0 +1 @@
gradPInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("gradPInterpolationType",word("cellPointFace")),gradP_).ptr());

View File

@ -0,0 +1 @@
gradPsolidInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("gradPsolidInterpolationType",word("cellPoint")),gradPsolid_).ptr());

View File

@ -0,0 +1 @@
gradUInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("gradUInterpolationType",word("cellPointFace")),gradU_).ptr());

View File

@ -0,0 +1 @@
gradVoidfractionInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("gradVoidfractionInterpolationType",word("cellPointFace")),gradVoidfraction_).ptr());

View File

@ -0,0 +1 @@
phiP1Interpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("phiP1InterpolationType",word("cellPoint")),phiP1_).ptr());

View File

@ -0,0 +1 @@
phiP2Interpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("phiP2InterpolationType",word("cellPoint")),phiP2_).ptr());

View File

@ -0,0 +1 @@
shearRateInterpolator_.reset(interpolation<symmTensor>::New(propsDict_.lookupOrDefault("shearRateInterpolationType",word("cellPointFace")),shearRate_).ptr());

View File

@ -0,0 +1 @@
TInterpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("TInterpolationType",word("cellPoint")),T_).ptr());

View File

@ -0,0 +1 @@
UInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("UInterpolationType",word("cellPointFace")),U_).ptr());

View File

@ -0,0 +1 @@
Up1Interpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("Up1InterpolationType",word("cellPointFace")),Up1_).ptr());

View File

@ -0,0 +1 @@
Up2Interpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("Up2InterpolationType",word("cellPointFace")),Up2_).ptr());

View File

@ -0,0 +1 @@
UsInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("UsInterpolationType",word("cellPointFace")),Us_).ptr());

View File

@ -0,0 +1 @@
voidfractionInterpolator_.reset(interpolation<scalar>::New(propsDict_.lookupOrDefault("voidfractionInterpolationType",word("cellPoint")),voidfraction_).ptr());

View File

@ -0,0 +1 @@
vorticityInterpolator_.reset(interpolation<vector>::New(propsDict_.lookupOrDefault("vorticityInterpolationType",word("cellPointFace")),vorticity_).ptr());

View File

@ -33,9 +33,9 @@ Description
#ifndef versionInfo_H
#define versionInfo_H
word CFDEMversion="cfdem-3.0.2";
word compatibleLIGGGHTSversion="3.3.1";
word OFversion="2.4.x-commit-3d8da0e960c717ff582f1517a27724144f086b83";
word CFDEMversion="cfdem-3.4.0";
word compatibleLIGGGHTSversion="3.4.0";
word OFversion="3.0.x-commit-ac3f6c67e02f0aac3777c27f9fb7558fc3536e37";
Info << "\nCFDEMcoupling version: " << CFDEMversion << endl;
Info << ", compatible to LIGGGHTS version: " << compatibleLIGGGHTSversion << endl;

View File

@ -75,6 +75,7 @@ Foam::cfdemCloud::cfdemCloud
)
),
solveFlow_(true),
solveScalarTransport_(true),
verbose_(false),
debug_(false),
ignore_(false),
@ -109,6 +110,7 @@ Foam::cfdemCloud::cfdemCloud
imExSplitFactor_(1.0),
treatVoidCellsAsExplicitForce_(false),
useDDTvoidfraction_("off"),
dragPrev_(NULL),
ddtVoidfraction_
(
IOobject
@ -262,6 +264,8 @@ Foam::cfdemCloud::cfdemCloud
Info << "If BC are important, please provide volScalarFields -imp/expParticleForces-" << endl;
if (couplingProperties_.found("solveFlow"))
solveFlow_=Switch(couplingProperties_.lookup("solveFlow"));
if (couplingProperties_.found("solveScalarTransport"))
solveScalarTransport_=Switch(couplingProperties_.lookup("solveScalarTransport"));
if (couplingProperties_.found("imExSplitFactor"))
imExSplitFactor_ = readScalar(couplingProperties_.lookup("imExSplitFactor"));
if (couplingProperties_.found("treatVoidCellsAsExplicitForce"))
@ -351,6 +355,18 @@ Foam::cfdemCloud::~cfdemCloud()
dataExchangeM().destroy(particleWeights_,1);
dataExchangeM().destroy(particleVolumes_,1);
dataExchangeM().destroy(particleV_,1);
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
int iUser=0;
for( std::vector<double**>::iterator
it = particleDatFieldsUserCFDEMToExt.begin();
it != particleDatFieldsUserCFDEMToExt.end();
++it)
{
Info << "cfdemCloud destroys UserCFDEM data: " << namesFieldsUserCFDEMToExt[iUser++] << endl;
dataExchangeM().destroy((*it),1);
}
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void Foam::cfdemCloud::getDEMdata()
@ -382,7 +398,27 @@ void Foam::cfdemCloud::giveDEMdata()
if(verbose_) Info << "giveDEMdata done." << endl;
}
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
// * * * write top level fields * * * //
void Foam::cfdemCloud::giveUSERdata()
{
if(forceM(0).coupleForce())
{
//Handover USER-defined data
for(std::vector<word>::iterator it = namesFieldsUserCFDEMToExt.begin(); it != namesFieldsUserCFDEMToExt.end(); ++it)
{
int positionInRegister = std::distance(namesFieldsUserCFDEMToExt.begin(), it);
dataExchangeM().giveData(namesFieldsUserCFDEMToExt[positionInRegister],"scalar-atom",
particleDatFieldsUserCFDEMToExt[positionInRegister]
);
Info << "giveData field with name '" << *it << "' at position: " << positionInRegister << endl;
}
}
if(verbose_) Info << "giveUSERdata done." << endl;
}
// * * * write top level fields * * * //
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
// * * * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * * * * //
@ -407,6 +443,12 @@ void Foam::cfdemCloud::setForces()
resetArray(expForces_,numberOfParticles(),3);
resetArray(DEMForces_,numberOfParticles(),3);
resetArray(Cds_,numberOfParticles(),1);
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
//reset all USER-defined particle fields
zeroizeParticleDatFieldsUserCFDEMToExt();
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
for (int i=0;i<cfdemCloud::nrForceModels();i++) cfdemCloud::forceM(i).setForce();
}
@ -710,6 +752,14 @@ bool Foam::cfdemCloud::reAllocArrays() const
dataExchangeM().allocateArray(particleWeights_,0.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleV_,0.,1);
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
if(namesFieldsUserCFDEMToExt.size()!=particleDatFieldsUserCFDEMToExt.size())
allocateParticleDatFieldsUserCFDEMToExt();
else
reAllocateParticleDatFieldsUserCFDEMToExt();
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
arraysReallocated_ = true;
return true;
}
@ -733,6 +783,13 @@ bool Foam::cfdemCloud::reAllocArrays(int nP, bool forceRealloc) const
dataExchangeM().allocateArray(cellIDs_,0.,voidFractionM().maxCellsPerParticle(),nP);
dataExchangeM().allocateArray(particleWeights_,0.,voidFractionM().maxCellsPerParticle(),nP);
dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle(),nP);
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
if(namesFieldsUserCFDEMToExt.size()!=particleDatFieldsUserCFDEMToExt.size())
allocateParticleDatFieldsUserCFDEMToExt();
else
reAllocateParticleDatFieldsUserCFDEMToExt();
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
arraysReallocated_ = true;
return true;
}
@ -860,6 +917,111 @@ void cfdemCloud::resetArray(double**& array,int length,int width,double resetVal
}
}
}
double **cfdemCloud::dragPrev()
{
return dragPrev_;
}
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
void cfdemCloud::registerNamesFieldsUserCFDEMToExt(word fieldToRegister, int& positionInRegister)
{
//check if field is available
Info << "cfdemCloud is registering field '" << fieldToRegister <<"'" << endl;
std::vector<word>::iterator it;
it = std::find(namesFieldsUserCFDEMToExt.begin(), namesFieldsUserCFDEMToExt.end(), fieldToRegister);
if ( it != namesFieldsUserCFDEMToExt.end() )
{
positionInRegister = std::distance(namesFieldsUserCFDEMToExt.begin(), it);
Info << "cfdemCloud found field '" << fieldToRegister << "' at position: " << positionInRegister << endl;
}
else
{
//if not, add to list of names
Info << "cfdemCloud COULD NOT find field '" << fieldToRegister <<"', will push to end." << endl;
namesFieldsUserCFDEMToExt.push_back(fieldToRegister);
positionInRegister = namesFieldsUserCFDEMToExt.size()-1;
}
}
//****************************************
bool cfdemCloud::checkAndregisterNamesFieldsUserCFDEMToExt(const wordList names, std::vector<int> & positionInRegister)
{
bool validFieldName=false;
forAll(names,i) {
int tempPosition=-1; //by default use -1 to indicate invalid field
if(names[i]!="none")
{
validFieldName = true;
registerNamesFieldsUserCFDEMToExt(names[i], tempPosition);
}
positionInRegister.push_back(tempPosition);
}
return validFieldName;
}
//****************************************
void cfdemCloud::allocateParticleDatFieldsUserCFDEMToExt() const
{
if(particleDatFieldsUserCFDEMToExt.size()>0)
FatalError << "cfdemCloud::allocateParticleDatFieldsUserCFDEMToExt(): you are attempting to allocate fields in a container that already contains elements. This is not allowed, please clear container." << abort(FatalError);
//Go through list and allocate
for(std::vector<word>::const_iterator it = namesFieldsUserCFDEMToExt.begin(); it != namesFieldsUserCFDEMToExt.end(); ++it)
{
Info << "allocating field with name '" << *it << "'" << endl;
particleDatFieldsUserCFDEMToExt.push_back(NULL); //Must be NULL, otherwise this might confuse external code
dataExchangeM().allocateArray(particleDatFieldsUserCFDEMToExt.back(),0.0,1);
}
}
//****************************************
void cfdemCloud::reAllocateParticleDatFieldsUserCFDEMToExt() const
{
//Go through list and allocate
for(std::vector<word>::iterator it = namesFieldsUserCFDEMToExt.begin(); it != namesFieldsUserCFDEMToExt.end(); ++it)
{
int positionInRegister = std::distance(namesFieldsUserCFDEMToExt.begin(), it);
if(verbose_)
Info << "reAllocating field with name '" << *it << "' at position: " << positionInRegister << endl;
dataExchangeM().allocateArray(particleDatFieldsUserCFDEMToExt[positionInRegister],0.0,1);
}
}
//****************************************
void cfdemCloud::zeroizeParticleDatFieldsUserCFDEMToExt()
{
//Go through list and set zero
for(std::vector<word>::iterator it = namesFieldsUserCFDEMToExt.begin(); it != namesFieldsUserCFDEMToExt.end(); ++it)
{
int positionInRegister = std::distance(namesFieldsUserCFDEMToExt.begin(), it);
if(verbose_)
Info << "Zeroizing field with name '" << *it << "' at position: " << positionInRegister << endl;
resetArray(particleDatFieldsUserCFDEMToExt[positionInRegister],numberOfParticles(),1);
}
}
//****************************************
void cfdemCloud::accessParticleDatFieldsUserCFDEMToExt(word fieldToAccess, double **& fieldData)
{
//set pointer to correct location in the memory
if(verbose_)
Info << "cfdemCloud is accessing field '" << fieldToAccess << "'" << endl;
std::vector<word>::iterator it;
it = std::find(namesFieldsUserCFDEMToExt.begin(), namesFieldsUserCFDEMToExt.end(), fieldToAccess);
if ( it != namesFieldsUserCFDEMToExt.end() )
{
int positionInRegister = std::distance(namesFieldsUserCFDEMToExt.begin(), it);
if(verbose_)
Info << "cfdemCloud found field '" << fieldToAccess << "' at position: " << positionInRegister << endl;
fieldData = particleDatFieldsUserCFDEMToExt[positionInRegister];
}
else
FatalError << "field " << fieldToAccess
<< " not found."
<< abort(FatalError);
}
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
#include "cfdemCloudIO.C"

View File

@ -91,6 +91,8 @@ protected:
Switch solveFlow_;
Switch solveScalarTransport_;
bool verbose_;
bool debug_;
@ -127,6 +129,8 @@ protected:
mutable double **particleV_;
mutable double **dragPrev_;
int numberOfParticles_;
//mutable int maxCellsPerParticle_; // lives now in voidFractionModel.H
@ -290,6 +294,8 @@ public:
inline bool solveFlow() const;
inline bool solveScalarTransport() const;
inline bool verbose() const;
inline const IOdictionary& couplingProperties() const;
@ -347,11 +353,51 @@ public:
virtual vector omega(int) const {return Foam::vector(0,0,0);};
//access to the particles' orientation information
virtual inline double ** exArray() const {return NULL;};
virtual vector ex(int) const {return Foam::vector(0,0,0);};
virtual inline double ** shapeArray() const {return NULL;};
virtual inline double ** exArray() const {
FatalError << "cfdemCloud::exArray(): you are attempting to get an access to ex array for spheroids/superquadrics. This is not allowed for spheres. Recompile the code with #define anisotropicRotation in OFversion.H or enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return NULL;
};
virtual vector ex(int) const {
FatalError << "cfdemCloud::ex(): you are attempting to get an access to ex array for spheroids/superquadrics. This is not allowed for spheres. Recompile the code with #define anisotropicRotation in OFversion.H or enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return Foam::vector(0,0,0);
};
virtual inline double ** shapeArray() const {
FatalError << "cfdemCloud::shapeArray(): you are attempting to get an access to shape array for spheroids/superquadrics. This is not allowed for spheres. Recompile the code with #define anisotropicRotation in OFversion.H or enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return NULL;
};
virtual vector shape(int) const {return Foam::vector(0,0,0);};
// access to complex shape information
virtual inline double ** vectorArray() const {return NULL;};
virtual scalar volume(int) const {
FatalError << "cfdemCloud::volume(): you are attempting to get an access to volume array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return 0;
};
virtual inline double ** areaArray() const {
FatalError << "cfdemCloud::areaArray(): you are attempting to get an access to area array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return NULL;
};
virtual scalar area(int) const {
FatalError << "cfdemCloud::arrea(): you are attempting to get an access to area array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return 0;
};
virtual inline double ** quaternionArray() const {
FatalError << "cfdemCloud::quaternionArray(): you are attempting to get an access to roundness array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return NULL;
};
virtual quaternion quat(int) const {
FatalError << "cfdemCloud::quat(): you are attempting to get an access to quaternion array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return quaternion(1);
};
virtual inline double ** roundnessArray() const {
FatalError << "cfdemCloud::roundnessArray(): you are attempting to get an access to roundness array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return NULL;
};
virtual vector2D roundness(int) const {
FatalError << "cfdemCloud::roundness(): you are attempting to get an access to roundness array for superquadrics. This is not allowed for spheres. Enable superquadrics in LIGGGHTS (SUPERQUADRIC_ACTIVE_FLAG)" << abort(FatalError);
return Foam::vector2D(0,0);
};
//Optinoal Extra arrays for implicit coupling with anisotropic drag
virtual inline double ** CdsExtra() const { return NULL;}; //only TWO extra components of drag coefficient
virtual inline double ** CdsRotation() const { return NULL;}; //three extra components of rotational drag
@ -359,6 +405,7 @@ public:
virtual inline bool implicitAnisotropicDrag() const {return false;}
virtual inline bool implicitRotation() const {return false;}
double **dragPrev();
//Detector if SRF module is enable or not
virtual inline bool SRFOn(){return false;}
@ -448,7 +495,23 @@ public:
std::vector< std::vector<double*> >* getVprobe();
std::vector< std::vector<double> >* getSprobe();
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
// EXPERIMENAL CODE
//SHARED GLOBAL PARTICLE Arrays (public containers for data management)
//1-USER-defined particle fields for CFDEM-->ExternalCode transfer (e.g., to handle fluxes)
virtual void giveUSERdata(); //trigger hand over of USER data to ExternalCode
mutable std::vector<word> namesFieldsUserCFDEMToExt;
mutable std::vector<double**> particleDatFieldsUserCFDEMToExt;
void registerNamesFieldsUserCFDEMToExt(word fieldToRegister, int& positionInRegister);
bool checkAndregisterNamesFieldsUserCFDEMToExt(const wordList names, std::vector<int> & positionInRegister);
void allocateParticleDatFieldsUserCFDEMToExt() const;
void reAllocateParticleDatFieldsUserCFDEMToExt() const;
void zeroizeParticleDatFieldsUserCFDEMToExt();
void accessParticleDatFieldsUserCFDEMToExt(word fieldToAccess, double **& fieldData);
//=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
};

View File

@ -90,6 +90,12 @@ inline bool cfdemCloud::solveFlow() const
return bool(solveFlow_);
}
inline bool cfdemCloud::solveScalarTransport() const
{
return bool(solveScalarTransport_);
}
inline bool cfdemCloud::verbose() const
{
return verbose_;

View File

@ -56,15 +56,10 @@ cfdemCloudIB::cfdemCloudIB
:
cfdemCloud(mesh),
angularVelocities_(NULL),
remoteScalarInterp_(NULL),
remoteVectorInterp_(NULL),
displs_(NULL),
pRefCell_(readLabel(mesh_.solutionDict().subDict("PISO").lookup("pRefCell"))),
pRefValue_(readScalar(mesh_.solutionDict().subDict("PISO").lookup("pRefValue"))),
pRefCell_(readLabel(mesh.solutionDict().subDict("PISO").lookup("pRefCell"))),
pRefValue_(readScalar(mesh.solutionDict().subDict("PISO").lookup("pRefValue"))),
haveEvolvedOnce_(false),
skipLagrangeToEulerMapping_(false),
useHFDIBM_(false),
checkPeriodicCells_(false)
skipLagrangeToEulerMapping_(false)
{
if(this->couplingProperties().found("skipLagrangeToEulerMapping"))
@ -72,21 +67,6 @@ cfdemCloudIB::cfdemCloudIB
Info << "Will skip lagrange-to-Euler mapping..." << endl;
skipLagrangeToEulerMapping_=true;
}
if(this->couplingProperties().found("useHFDIBM"))
{
Info << "Will use Hybrid Fictitious Domain / Immerse Boundary Method" << endl;
useHFDIBM_=true;
HFDIBMinterpDict_=this->couplingProperties().subDict("HFDIBMProps").subDict("interpFunctions");
if(this->couplingProperties().subDict("HFDIBMProps").found("checkPeriodicCells"))
checkPeriodicCells_=true;
}
//get MPI info for communication
MPI_Comm_rank(MPI_COMM_WORLD,&me);
MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
dataExchangeM().allocateArray(displs_, 0, nprocs);
}
@ -94,10 +74,8 @@ cfdemCloudIB::cfdemCloudIB
cfdemCloudIB::~cfdemCloudIB()
{
dataExchangeM().destroy(angularVelocities_,1);
dataExchangeM().destroy(remoteScalarInterp_);
dataExchangeM().destroy(remoteVectorInterp_);
dataExchangeM().destroy(displs_);
dataExchangeM().destroy(angularVelocities_,3);
dataExchangeM().destroy(dragPrev_,3);
}
@ -105,17 +83,19 @@ cfdemCloudIB::~cfdemCloudIB()
void Foam::cfdemCloudIB::getDEMdata()
{
cfdemCloud::getDEMdata();
Info << "=== cfdemCloudIB::getDEMdata() === particle rotation not considered in CFD" << endl;
//dataExchangeM().getData("omega","vector-atom",angularVelocities_);
dataExchangeM().getData("omega","vector-atom",angularVelocities_);
}
bool Foam::cfdemCloudIB::reAllocArrays() const
{
if(cfdemCloud::reAllocArrays())
{
Info <<"Foam::cfdemCloudIB::reAllocArrays()"<<endl;
dataExchangeM().allocateArray(angularVelocities_,0,3);
dataExchangeM().allocateArray(dragPrev_,0,3);
return true;
}
return true;
return false;
}
bool Foam::cfdemCloudIB::evolve
@ -150,14 +130,6 @@ bool Foam::cfdemCloudIB::evolve
if(verbose_) Info << "- setvoidFraction()" << endl;
voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_,particleV_);
if(verbose_) Info << "setvoidFraction done." << endl;
if(useHFDIBM_)
{
// set void fraction field
if(verbose_) Info << "- setInterpolationPoints()" << endl;
setInterpolationPoints();
if(verbose_) Info << "setInterpolationPoints done." << endl;
}
}
// update voidFractionField
@ -256,18 +228,8 @@ void Foam::cfdemCloudIB::setParticleVelocity
velRot=angVel^rVec;
for(int i=0;i<3;i++) uParticle[i] = velocities()[index][i]+velRot[i];
//That is misleading! The function is named setParticleVelocity and thus should return
//ONLY the particle velocity field. Then the user can change it as he likes.
// impose field velocity
if(useHFDIBM_)
{
U[cellI]=uParticle;
}
else
{
U[cellI]=(1-voidfractions_[index][subCell])*uParticle+voidfractions_[index][subCell]*U[cellI];
}
U[cellI]=(1-voidfractions_[index][subCell])*uParticle+voidfractions_[index][subCell]*U[cellI];
}
}
}
@ -280,806 +242,7 @@ vector Foam::cfdemCloudIB::angularVelocity(int index)
for(int i=0;i<3;i++) vel[i] = angularVelocities_[index][i];
return vel;
}
// * * * * * * * * * * * * * * * HFDIBM Functions * * * * * * * * * * * * * //
void Foam::cfdemCloudIB::setInterpolationPoints()
{
if(verbose_) Info << "Reallocating arrays for HFDIBM" << endl;
reallocateHFDIBMarrays();
if(verbose_) Info << "-Reallocation done"<<endl;
if(verbose_) Pout << "Number of particles: " << numberOfParticles()<<endl;
std::vector<double> localRemoteInterpolationPoints_;
for(int par=0; par< numberOfParticles(); par++)
{
scalar radius = radii()[0][par];
for(int subCell=0;subCell<cellsPerParticle()[par][0];subCell++)
{
label cellI = cellIDs()[par][subCell];
vector ParPos(positions()[par][0],positions()[par][1],positions()[par][2]);
// Loop over all the particle cells and collect the ones belonging
// to the "surface" (i.e 0.001 < phi < 0.999)
if(cellI < 0) continue;
if( voidFractionM().voidFractionNext()[cellI] < 1e-03 ||
voidFractionM().voidFractionNext()[cellI] > ( 1 - 1e-03)
) continue; //Take only boundary cells
vector posC = mesh_.C()[cellI];
double res_ = 1.2*std::pow( mesh_.V()[cellI] , 0.3333 ); //distance between interpPoints
if(checkPeriodicCells_)
{
// Some cells may be located on the other side of a periodic boundary.
// In this case, the particle center has to be mirrored in order to correctly
// evaluate the interpolation points.
//
// Notice that a tolerance of 20% is used which means that the domain should be relatively
// larger ( >140% of the particle size) in order to trigger the algorithm OR the mesh should
// not be coarser that 5 cells per particle diameter.
for(int dir=0;dir<3;dir++)
{
if( std::abs(ParPos[dir] - posC[dir]) > 1.2*radius)
{
ParPos[dir] -= mesh().bounds().max()[dir] - mesh().bounds().min()[dir];
if( std::abs(ParPos[dir] - posC[dir]) > 1.2*radius)
{
ParPos[dir] += 2*(mesh().bounds().max()[dir] - mesh().bounds().min()[dir]);
}
}
}
}
posC = posC - ParPos;
scalar rC = mag(posC) + 1e-08;
scalar theta_ = std::acos(posC[2]/rC);
scalar phi_ = std::atan2(posC[1],posC[0] );
// Surface position and interpolation points are initially calculated relatively
// to the particle center
vector posS(radius * std::sin(theta_) * std::cos(phi_),
radius * std::sin(theta_) * std::sin(phi_),
radius * std::cos(theta_)
);
vector posP1((radius + res_) * std::sin(theta_) * std::cos(phi_),
(radius + res_) * std::sin(theta_) * std::sin(phi_),
(radius + res_) * std::cos(theta_)
);
vector posP2((radius + 2*res_) * std::sin(theta_) * std::cos(phi_),
(radius + 2*res_) * std::sin(theta_) * std::sin(phi_),
(radius + 2*res_) * std::cos(theta_)
);
// Get absolute position in mesh
posS = posS + ParPos;
posP1 = posP1 + ParPos;
posP2 = posP2 + ParPos;
if(checkPeriodicCells_)
{
// If P1 or P2 are crossing the periodic boundary, they should be mirrored
// Check P1
for(int dir=0;dir<3;dir++)
{
if( std::abs( posP1[dir] ) > mesh().bounds().max()[dir])
{
posP1[dir] -= mesh().bounds().max()[dir] - mesh().bounds().min()[dir];
}
if( std::abs(posP1[dir] ) < mesh().bounds().min()[dir])
{
posP1[dir] += (mesh().bounds().max()[dir] - mesh().bounds().min()[dir]);
}
}
// Check P2
for(int dir=0;dir<3;dir++)
{
if( std::abs(posP2[dir] ) > mesh().bounds().max()[dir])
{
posP2[dir] -= mesh().bounds().max()[dir] - mesh().bounds().min()[dir];
}
if( std::abs(posP2[dir] ) < mesh().bounds().min()[dir])
{
posP2[dir] += (mesh().bounds().max()[dir] - mesh().bounds().min()[dir]);
}
}
}
// Now we look for the cells containing the interpolation points.
// If they are not available (i.e. cellID=-1) they are added to the
// list of points to interpolate remotely.
label cellP1 = locateModel_->findSingleCell(posP1,cellI);
//if cannot find, it is probably in a different processor
if(cellP1==-1)
{
localRemoteInterpolationPoints_.push_back(posP1.component(0));
localRemoteInterpolationPoints_.push_back(posP1.component(1));
localRemoteInterpolationPoints_.push_back(posP1.component(2));
}
else
{
//Check if inside particle
if( voidFractionM().voidFractionNext()[cellP1] < 1- 1e-03 )
cellP1 = -2;
}
label cellP2 = locateModel_->findSingleCell(posP2,cellI);
//if cannot find, it is probably in a different processor
if(cellP2==-1)
{
localRemoteInterpolationPoints_.push_back(posP2.component(0));
localRemoteInterpolationPoints_.push_back(posP2.component(1));
localRemoteInterpolationPoints_.push_back(posP2.component(2));
}
else
{
//Check if inside particle
if( voidFractionM().voidFractionNext()[cellP2] < 1- 1e-03 )
cellP2 = -2;
}
// The cell ID is pushed back even when -1.
// In this way, the order in wich -1 appears in the
// interpCells_ vectors is the same in the localRemoteInterpolationPoints_
// (i.e. they refer to the same interpolation point).
interpP_[0][par].push_back(posP1);
interpP_[1][par].push_back(posP2);
interpCells_[0][par].push_back(cellP1);
interpCells_[1][par].push_back(cellP2);
surfaceCells_[par].push_back(cellI);
}
}
communicateRemoteInterpolationPoints(localRemoteInterpolationPoints_);
}
//-------------------------------------------------//
void Foam::cfdemCloudIB::reallocateHFDIBMarrays()
{
std::vector< label > labelTmp_;
std::vector< vector > doubleTmp_;
//delete old vectors and reserve new space
interpP_[0].clear();
interpP_[0].reserve(numberOfParticles());
interpP_[1].clear();
interpP_[1].reserve(numberOfParticles());
interpCells_[0].clear();
interpCells_[1].clear();
interpCells_[0].reserve(numberOfParticles());
interpCells_[1].reserve(numberOfParticles());
surfaceCells_.clear();
surfaceCells_.reserve(numberOfParticles());
//Reserve space
for(int par=0; par< numberOfParticles(); par++)
{
//create vectors for particle and reserve space
//Provide an estimation of the space to reserve, i.e NofCells^(2/3) to estimate discrete particle surface
int spaceToReserve_ = int( std::pow( ( cellsPerParticle()[par][0] ) , 0.6666 ) );
interpP_[0].push_back(doubleTmp_);
interpP_[0][par].reserve(spaceToReserve_);
interpP_[1].push_back(doubleTmp_);
interpP_[1][par].reserve(spaceToReserve_);
interpCells_[0].push_back(labelTmp_);
interpCells_[1].push_back(labelTmp_);
interpCells_[0][par].reserve(spaceToReserve_);
interpCells_[1][par].reserve(spaceToReserve_);
surfaceCells_.push_back(labelTmp_);
surfaceCells_[par].reserve(spaceToReserve_);
}
}
//-------------------------------------------------//
void Foam::cfdemCloudIB::communicateRemoteInterpolationPoints(std::vector<double> localRemoteInterpolationPoints_)
{
if(nprocs == 1) return;
int sizeP = localRemoteInterpolationPoints_.size();
int nOfPoints = localRemoteInterpolationPoints_.size()/3;
if(verbose_)
Pout << "Processor " << me << " found " << nOfPoints << " remote interpolation points" << endl;
int numfrags[nprocs];
// The localRemoteInterpolationPoints_ vectors are gathered by
// every processor since (also because of periodicity) the "not found"
// interpolation points could be located in any processor.
//Get sizeP from every processor
MPI_Allgather( &sizeP, 1, MPI_INT, numfrags, 1, MPI_INT, MPI_COMM_WORLD);
//create displacement array
int totSize = 0;
for(int p=0;p<nprocs;p++)
{
displs_[p] = totSize;
totSize += numfrags[p];
}
//Allocate space for remoteInterpolationPoints
//and initialise empty vector
double tmpInterpoPoints[totSize];
MPI_Allgatherv( &localRemoteInterpolationPoints_[0],
numfrags[me],
MPI_DOUBLE,
&tmpInterpoPoints[0],
numfrags,
displs_,
MPI_DOUBLE,
MPI_COMM_WORLD
);
remoteInterpolationPoints.clear();
remoteInterpolationPoints.assign(tmpInterpoPoints,tmpInterpoPoints+totSize);
// Now that the communication is complete, we perform some more operations
// to improve the speed during interpolation.
//Create legend & list of cells for fast access (avoid using findCell() during interpolation)
int totNofRemotePoints = remoteInterpolationPoints.size()/3;
//initialize vector of velid remote points
double remoteFDTmp_[totNofRemotePoints];
for( int id_=0; id_<totSize;id_++)
remoteFDTmp_[id_]=0;
switchRemoteToFD_.assign(totNofRemotePoints,0);
for(int point_=0;point_<totNofRemotePoints;point_++)
{
int currentId = point_*3;
vector P( remoteInterpolationPoints[currentId ],
remoteInterpolationPoints[currentId + 1],
remoteInterpolationPoints[currentId + 2]
);
label cell0 = 0;
label cellP = locateModel_->findSingleCell(P,cell0);
if(cellP != -1)
{
//Check if inside particle
if( voidFractionM().voidFractionNext()[cellP] < 1- 1e-03 )
{
remoteFDTmp_[point_] = 1;
continue;
}
remoteInterpLegend.push_back(currentId);
remoteInterpCells.push_back(cellP);
}
}
dataExchangeM().allocateArray(remoteScalarInterp_, 0, totNofRemotePoints);
dataExchangeM().allocateArray(remoteVectorInterp_, 0, totSize);
//now everyone knows if is valid or should switch to FD
MPI_Allreduce(remoteFDTmp_, &switchRemoteToFD_[0], totNofRemotePoints ,MPI_INT, MPI_SUM, MPI_COMM_WORLD);
}
//--------------------------------------------------------------------------------------------//
void Foam::cfdemCloudIB::vectorInterpolateRemote( volVectorField& V, volVectorField& Vs)
{
autoPtr<interpolation<vector> > interpV_ = interpolation<vector>::New(HFDIBMinterpDict_, V);
int totSize=remoteInterpolationPoints.size();
double remoteVectorInterpTmp_[totSize];
//Set old array to zero
for( int id_=0; id_<totSize;id_++)
{
remoteVectorInterp_[id_]=0.0;
remoteVectorInterpTmp_[id_]=0.0;
}
// Following the remoteInterpLegend, each processor interpolates the
// remote points it owns.
for(unsigned int point_=0; point_< remoteInterpLegend.size();point_++)
{
//Get cellId and position of the interpolation point
label cellI = remoteInterpCells[point_];
int currentId = remoteInterpLegend[point_];
vector P( remoteInterpolationPoints[currentId ],
remoteInterpolationPoints[currentId + 1],
remoteInterpolationPoints[currentId + 2]
);
//interpolate
vector VP = interpV_->interpolate( P, cellI ) ;
//assign to array
remoteVectorInterpTmp_[currentId ] = VP.component(0);
remoteVectorInterpTmp_[currentId + 1] = VP.component(1);
remoteVectorInterpTmp_[currentId + 2] = VP.component(2);
}
// The use of MPI_Allreduce allows to keep the original order.
// Thus, the reduced vector is still synchronized with the local
// interpCells_ vector.
MPI_Allreduce(remoteVectorInterpTmp_, remoteVectorInterp_, totSize ,MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
}
//--------------------------------------------------------------------------------------------//
void Foam::cfdemCloudIB::scalarInterpolateRemote( volScalarField& S,volScalarField& Ss)
{
autoPtr<interpolation<scalar> > interpS_ = interpolation<scalar>::New(HFDIBMinterpDict_, S);
int totSize=remoteInterpolationPoints.size()/3;
//Set old array to zero
double remoteScalarInterpTmp_[totSize];
for( int id_=0; id_<totSize;id_++)
{
remoteScalarInterp_[id_]=0.0;
remoteScalarInterpTmp_[id_]=0.0;
}
// Following the remoteInterpLegend, each processor interpolates the
// remote points it owns.
for(unsigned int point_=0; point_< remoteInterpLegend.size();point_++)
{
//Get cellId and position of the interpolation point
label cellI = remoteInterpCells[point_];
int currentId = remoteInterpLegend[point_];
vector P( remoteInterpolationPoints[currentId ],
remoteInterpolationPoints[currentId + 1],
remoteInterpolationPoints[currentId + 2]
);
//interpolate
scalar SP = interpS_->interpolate( P, cellI ) ;
//assign to array
remoteScalarInterpTmp_[currentId/3] = SP;
//Ss[cellI] = 9999999999999*2;
}
// The use of MPI_Allreduce allows to keep the original order.
// Thus, the reduced vector is still synchronized with the local
// interpCells_ vector.
MPI_Allreduce(remoteScalarInterpTmp_, remoteScalarInterp_, totSize ,MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
}
//--------------------------------------------------------------------------------------------//
void Foam::cfdemCloudIB::interpolateVectorField( volVectorField &V, //main field
volVectorField &Vs //imposed field
)
{
if(!useHFDIBM_) return;
//create Interpolator
autoPtr<interpolation<vector> > interpV_ = interpolation<vector>::New(HFDIBMinterpDict_, V);
//First of all, interpolate remote points
vectorInterpolateRemote(V, Vs);
int remoteCount = 0;
for(int par=0; par< numberOfParticles(); par++)
{
scalar radius = radii()[0][par];
int surfCls_ = surfaceCells_[par].size();
for(int surf_=0; surf_<surfCls_; surf_++)
{
label cellI = surfaceCells_[par][surf_];
vector posC = mesh_.C()[cellI];
vector ParPos(positions()[par][0],positions()[par][1],positions()[par][2]);
bool useFD=false;
if(checkPeriodicCells_)
{
// Again, the particle position could need a mirroring
// in order to correctly calculate the distance between the
// surface cell and the particle center.
for(int dir=0;dir<3;dir++)
{
if( std::abs(ParPos[dir] - posC[dir]) > 1.2*radius)
{
ParPos[dir] -= mesh().bounds().max()[dir] - mesh().bounds().min()[dir];
if( std::abs(ParPos[dir] - posC[dir]) > 1.2*radius)
{
ParPos[dir] += 2*(mesh().bounds().max()[dir] - mesh().bounds().min()[dir]);
}
}
}
}
double rC = mag(posC - ParPos);
vector VP1(0.0,0.0,0.0);
vector VP2(0.0,0.0,0.0);
// If the cellID is -1, look in remoteVectorInterp_ to find the
// remotely intrpolated values.
if(interpCells_[0][par][surf_] > -1)
{
VP1 = interpV_->interpolate( interpP_[0][par][surf_],
interpCells_[0][par][surf_]
) - Vs[cellI];
}
else if(interpCells_[0][par][surf_] != -2)
{
if(switchRemoteToFD_[displs_[me]/3 + remoteCount]==1)
{
useFD=true;
}
else
{
VP1.component(0) = remoteVectorInterp_[displs_[me] + remoteCount*3 ];
VP1.component(1) = remoteVectorInterp_[displs_[me] + remoteCount*3 +1];
VP1.component(2) = remoteVectorInterp_[displs_[me] + remoteCount*3 +2];
VP1 = VP1 - Vs[cellI];
}
remoteCount++;
}
else
{
useFD=true;
}
if(interpCells_[1][par][surf_] > -1)
{
VP2 = interpV_->interpolate( interpP_[1][par][surf_],
interpCells_[1][par][surf_]
) - Vs[cellI];
}
else if(interpCells_[1][par][surf_] != -2)
{
if(switchRemoteToFD_[displs_[me]/3 + remoteCount]==1)
{
useFD=true;
}
else
{
VP2.component(0) = remoteVectorInterp_[displs_[me] + remoteCount*3 ];
VP2.component(1) = remoteVectorInterp_[displs_[me] + remoteCount*3 +1];
VP2.component(2) = remoteVectorInterp_[displs_[me] + remoteCount*3 +2];
VP2 = VP2 - Vs[cellI];
}
remoteCount++;
}
if(useFD)
{
//Vs[cellI] = voidFractionM().voidFractionNext()[cellI]*V[cellI] + (1- voidFractionM().voidFractionNext()[cellI])*Vs[cellI];
continue;
}
double res_ = 1.2*std::pow( mesh_.V()[cellI] , 0.3333 ); //distance between interpPoints
vector quadCoeff = 1/(res_*res_) * ( VP2/2 - VP1 );
vector linCoeff = 1/(2*res_) * ( 4*VP1 - VP2 );
//Correct imposed field
Vs[cellI] = quadCoeff*(rC-radius)*(rC-radius) + linCoeff * (rC-radius) + Vs[cellI] ;
}
}
}
//------------------------------------------------------------------------------------------//
void Foam::cfdemCloudIB::interpolateScalarField( volScalarField &S, //main field
volScalarField &Ss //imposed field
)
{
if(!useHFDIBM_) return;
autoPtr<interpolation<scalar> > interpS_ = interpolation<scalar>::New(HFDIBMinterpDict_, S);
//First of all, interpolate remote points
scalarInterpolateRemote(S, Ss);
int remoteCount = 0;
for(int par=0; par< numberOfParticles(); par++)
{
scalar radius = radii()[0][par];
int surfCls_ = surfaceCells_[par].size();
for(int surf_=0; surf_<surfCls_; surf_++)
{
bool useFD=false;
label cellI = surfaceCells_[par][surf_];
vector posC = mesh_.C()[cellI];
vector ParPos(positions()[par][0],positions()[par][1],positions()[par][2]);
if(checkPeriodicCells_)
{
// Again, the particle position could need a mirroring
// in order to correctly calculate the distance between the
// surface cell and the particle center.
for(int dir=0;dir<3;dir++)
{
if( std::abs(ParPos[dir] - posC[dir]) > 1.2*radius)
{
ParPos[dir] -= mesh().bounds().max()[dir] - mesh().bounds().min()[dir];
if( std::abs(ParPos[dir] - posC[dir]) > 1.2*radius)
{
ParPos[dir] += 2*(mesh().bounds().max()[dir] - mesh().bounds().min()[dir]);
}
}
}
}
double rC = mag(posC - ParPos);
scalar SP1=0.0;
scalar SP2=0.0;
// If the cellID is -1, look in remoteVectorInterp_ to find the
// remotely intrpolated values.
if(interpCells_[0][par][surf_] > -1)
{
SP1 = interpS_->interpolate( interpP_[0][par][surf_],
interpCells_[0][par][surf_]
) - Ss[cellI];
}
else if(interpCells_[0][par][surf_] != -2)
{
if(switchRemoteToFD_[displs_[me]/3 + remoteCount]==1)
{
useFD=true;
}
else
{
SP1 = remoteScalarInterp_[displs_[me]/3 + remoteCount] -Ss[cellI];
}
remoteCount++;
}
else
{
useFD=true;
}
if(interpCells_[1][par][surf_] > -1)
{
SP2 = interpS_->interpolate( interpP_[1][par][surf_],
interpCells_[1][par][surf_]
) - Ss[cellI];
}
else if(interpCells_[1][par][surf_] != -2)
{
if(switchRemoteToFD_[displs_[me]/3 + remoteCount]==1)
{
useFD=true;
}
else
{
SP2 = remoteScalarInterp_[displs_[me]/3 + remoteCount] -Ss[cellI];
}
remoteCount++;
}
else
{
useFD=true;
}
if(useFD)
{
// Ss[cellI] = voidFractionM().voidFractionNext()[cellI]*S[cellI] + (1- voidFractionM().voidFractionNext()[cellI])*Ss[cellI];
continue;
}
double res_ = 1.2*std::pow( mesh_.V()[cellI] , 0.3333 ); //distance between interpPoints
scalar quadCoeff = 1/(res_*res_) * ( SP2/2 - SP1 );
scalar linCoeff = 1/(2*res_) * ( 4*SP1 - SP2 );
//Correct imposed field
// Ss[interpCells_[0][par][surf_]] = -999999999;
// Ss[interpCells_[1][par][surf_]] = 999999999;
Ss[cellI] = quadCoeff*(rC-radius)*(rC-radius) + linCoeff * (rC-radius) + Ss[cellI] ;
}
}
}
//---------------------------------------------------------------------------//
void Foam::cfdemCloudIB::checkInterfaceFlowRate()
{
//This function should just be used to check the solver and for debugging
//Each particle is discretized in several lagrangian points where the velocity field is interpolated
if(!this->couplingProperties().subDict("HFDIBMProps").found("checkInterfaceFlowRate"))
return;
int thetaDiscr_ = 180;
int phiDiscr_ = 180;
// Loop over all the particles
//
// Interpolate at the discrete surface
// point
double totalFlux_=0.0;
double pi_=3.14159265359;
double totSurf=0.0;
volVectorField U = mesh_.lookupObject<volVectorField>("U");
//create Interpolator
autoPtr<interpolation<vector> > interpV_ = interpolation<vector>::New(HFDIBMinterpDict_, U);
for(int par=0; par< numberOfParticles(); par++)
{
scalar radius = radii()[0][par];
//Advance of two to correctly consider the angle at the poles
for(int thetaId_=0;thetaId_<thetaDiscr_/2;thetaId_++)
{
double theta = (1+thetaId_*2)*pi_/thetaDiscr_;
vector ParPos(positions()[par][0],positions()[par][1],positions()[par][2]);
for(int phiId_=0;phiId_<phiDiscr_;phiId_++)
{
double phi=phiId_*phiId_*2*pi_/phiDiscr_;
double surf_= radius*radius*(2*pi_/phiDiscr_)*( cos(theta - pi_/(thetaDiscr_) ) - cos(theta + pi_/(thetaDiscr_) ) );
totSurf+=surf_;
vector posS(radius * std::sin(theta) * std::cos(phi),
radius * std::sin(theta) * std::sin(phi),
radius * std::cos(theta)
);
posS=posS+ParPos;
label cell0 = 0;
label cellS = locateModel_->findSingleCell(posS,cell0);
if(cellS==-1) continue;
vector US = interpV_->interpolate( posS, cellS);
posS = (posS-ParPos)/radius;
//flow normal to the surface
totalFlux_ += std::abs( US&posS*surf_ );
}
}
}
Pout << "Total flow rate normal to the immersed surfaces : " << totalFlux_ << endl;
Pout << "Total immersed surfaces: " << totSurf << endl; //Should be pi for one particle with dp=1
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam

View File

@ -42,9 +42,6 @@ SourceFiles
#define cfdemCloudIB_H
#include "cfdemCloud.H"
#include <vector>
#include "interpolation.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -68,31 +65,6 @@ protected:
mutable bool haveEvolvedOnce_;
mutable bool skipLagrangeToEulerMapping_;
//===
mutable bool useHFDIBM_;
mutable bool checkPeriodicCells_;
//HFDIBM members
std::vector< std::vector< Foam::vector > > interpP_[2];
std::vector< std::vector< label > > interpCells_[2];
std::vector< std::vector< label > > surfaceCells_;
std::vector<double> remoteInterpolationPoints;
double* remoteScalarInterp_;
double* remoteVectorInterp_;
std::vector<int> remoteInterpLegend;
std::vector<label> remoteInterpCells;
dictionary HFDIBMinterpDict_;
int me;
int nprocs;
int* displs_;
std::vector<int> switchRemoteToFD_;
void setInterpolationPoints();
void reallocateHFDIBMarrays();
void communicateRemoteInterpolationPoints(std::vector<double> localRemoteInterpolationPoints_);
void vectorInterpolateRemote( volVectorField &V, volVectorField &Vs);
void scalarInterpolateRemote( volScalarField &S, volScalarField &Ss);
//===
public:
// Constructors
@ -117,7 +89,7 @@ public:
void calcVelocityCorrection(volScalarField&,volVectorField&,volScalarField&,volScalarField&);
void setParticleVelocity(volVectorField&);
virtual void setParticleVelocity(volVectorField&);
// Access
vector angularVelocity(int);
@ -126,17 +98,6 @@ public:
{
return angularVelocities_;
};
void interpolateVectorField( volVectorField &V, //main field
volVectorField &Vs //imposed field
);
void interpolateScalarField( volScalarField &S, //main field
volScalarField &Ss //imposed field
);
void checkInterfaceFlowRate();
};

View File

@ -0,0 +1,29 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
turbulenceProperties
{
simulationType RASModel;
}
couplingProperties
{
turbulenceModelType "RASProperties";
}
}
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 3.0.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object changeDictionaryDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dictionaryReplacement
{
turbulenceProperties
{
simulationType laminar;
RAS
{
RASModel laminar;
turbulence off;
printCoeffs on;
}
}
couplingProperties
{
turbulenceModelType turbulenceProperties;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,12 @@
#!/bin/bash
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc
#shopt -s expand_aliases
ETCpath=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/OFVersionChange/shellScripts
$ETCpath/unComment.sh $1 CFD/constant/turbulenceProperties
$ETCpath/unComment.sh $1 CFD/constant/transportProperties
$ETCpath/unComment.sh $1 CFD/constant/couplingProperties
$ETCpath/unComment.sh $1 CFD/constant/couplingProperties_run
$ETCpath/unComment.sh $1 CFD/constant/couplingProperties_restart
$ETCpath/unComment.sh $1 CFD/system/fvOptions

View File

@ -0,0 +1,32 @@
#!/bin/bash
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/bashrc
#shopt -s expand_aliases
# find my OF version
if [ "$WM_PROJECT_VERSION" == "3.0.x" ]; then
echo 'You are using OpenFOAM 3.0.x. Will activate dicts now...'
OFV=OFversion30x
else
echo 'You are using OpenFOAM 2.4.x or lower. Will activate dicts now...'
OFV=OFversion24x
fi
ETCpath=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/OFVersionChange/shellScripts
# remove old comment // in every line ending with OFversionXYZ
# doing this three times to make sure multiple comments are removed
bash $ETCpath/activateVersion.sh OFversion
bash $ETCpath/activateVersion.sh OFversion
bash $ETCpath/activateVersion.sh OFversion
# adding comment // to all lines ending with OFversionXYZ
bash $ETCpath/commentOut.sh OFversion CFD/constant/turbulenceProperties
bash $ETCpath/commentOut.sh OFversion CFD/constant/transportProperties
bash $ETCpath/commentOut.sh OFversion CFD/constant/couplingProperties
bash $ETCpath/commentOut.sh OFversion CFD/constant/couplingProperties_run
bash $ETCpath/commentOut.sh OFversion CFD/constant/couplingProperties_restart
bash $ETCpath/commentOut.sh OFversion CFD/system/fvOptions
# removing the comment // in every line ending with $OFV
bash $ETCpath/activateVersion.sh $OFV

View File

@ -0,0 +1,5 @@
#!/bin/bash
#Syntax: commentOut <stringTo Search, e.g., version30x> <file>
#This will do a GLOBAL commenting out!
sed -i "/$1/ s:^://:g" $2

View File

@ -0,0 +1,5 @@
#!/bin/bash
#Syntax: unComment <stringTo Search, e.g., version30x> <file>
#This will do a GLOBAL uncomment!
sed -i "/$1/ s:^//::g" $2

View File

@ -1,44 +0,0 @@
//#define versionExt32 // being tested
//#define version30 // being tested
//#define version24Dev // uses Dev (e.g. new turbulence model structure) code within 24x
#define version24 // 2.4.x with old turbulence model structure // currently being used
//#define version23
//#define version22
//#define version21
//#define version16ext
//#define version15
//define anisotropicRotation cloud models
//#define anisotropicRotation
// features of 16ext work also in extend 3.2
#if defined(versionExt32)
#define version16ext
#endif
// features of 2.4Dev work also in Dev
#if defined(version30)
#define version24Dev
#endif
// basically use 24x settings + some dev features (e.g. new turbulence model structure)
#if defined(version24Dev)
#define version24
#endif
// features of 2.4 work also in 2.3
#if defined(version24)
#define version23
#endif
// features of 2.1 work also in 2.3
#if defined(version23)
#define version21
#define version221
#endif
// features of 2.1 work also in 2.2
#if defined(version22)
#define version21
#define version221
#endif

View File

@ -1,39 +0,0 @@
# paths for additional libraries
CFDEM_ADD_LIB_PATHS = \
# additional libraries to be linked to solvers
CFDEM_ADD_LIBS = \
# additional static libraries to be linked to lagrangian library
CFDEM_ADD_STATICLIBS = \
-lmpi_cxx \
#################################################################
## SETTINGS FOR 2.4.x ##
#################################################################
#----------------------------------------------------------------
# incompressible turbulence model settings
#----------------------------------------------------------------
# paths for incompressible turbulence models to use
CFDEM_ADD_INCOMPTURBMOD_PATHS = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
# libs for turbulence models to use
CFDEM_ADD_INCOMPTURBMOD_LIBS = \
-lincompressibleRASModels \
-lincompressibleLESModels \
#----------------------------------------------------------------
# compressible turbulence model settings
#----------------------------------------------------------------
# paths for compressible turbulence models to use
CFDEM_ADD_COMPTURBMOD_PATHS = \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \
# libs for turbulence models to use
CFDEM_ADD_COMPTURBMOD_LIBS = \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfluidThermophysicalModels \

View File

@ -1,48 +0,0 @@
# paths for additional libraries
CFDEM_ADD_LIB_PATHS = \
-L/usr/include/vtk \
-L/usr/lib64/vtk \
# additional libraries to be linked to solvers
CFDEM_ADD_LIBS = \
-lvtkCommonCore \
-lvtkIOCore \
-lvtkIOXML \
-lvtkIOLegacy \
-lvtkCommonDataModel \
# additional static libraries to be linked to lagrangian library
CFDEM_ADD_STATICLIBS = \
-lmpi_cxx \
#################################################################
## SETTINGS FOR 3.0.x ##
#################################################################
#----------------------------------------------------------------
# incompressible turbulence model settings
#----------------------------------------------------------------
# paths for incompressible turbulence models to use
CFDEM_ADD_INCOMPTURBMOD_PATHS = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
# libs for turbulence models to use
CFDEM_ADD_INCOMPTURBMOD_LIBS = \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
#----------------------------------------------------------------
# compressible turbulence model settings
#----------------------------------------------------------------
# paths for compressible turbulence models to use
CFDEM_ADD_COMPTURBMOD_PATHS = \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
# libs for turbulence models to use
CFDEM_ADD_COMPTURBMOD_LIBS = \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
#################################################################

Some files were not shown because too many files have changed in this diff Show More