Giter Site home page Giter Site logo

picfoam's Introduction

picFoam

picFoam is a fully kinetic electrostatic Particle-in-Cell(PIC) solver, including Monte Carlo Collisions(MCC), for non-equilibrium plasma research.

The solver is developed at ZARM (Center of Applied Space Technology and Microgravity, University of Bremen).

Publications

  1. picFoam: An OpenFOAM based electrostatic Particle-in-Cell solver (preprint)

Instructions

picFoam requires OpenFOAM version 9.

For OpenFOAM version 10 checkout the branch openfoam-v10 (Note: The branch was tested for compilation only!)

Detailed installation instructions for OpenFOAM can be found here.

OpenFOAM installation

Summery of the OpenFOAM installtion (link above):

  1. Compiler: GCC version > 5.4 or above; or LLVM Clang version > 3.6 or above; or Intel ICC version > 17.0.4 or above

  2. Package dependencies (for Ubuntu version 18.04 or above):

    OpenFOAM:
    
     build-essential
     cmake
     git
     ca-certificates
     flex
     libfl-dev
     bison
     zlib1g-dev
     libboost-system-dev
     libboost-thread-dev
     libopenmpi-dev
     openmpi-bin
     gnuplot
     libreadline-dev
     libncurses-dev
     libxt-dev
    

    ParaView:

     libqt5x11extras5-dev
     libxt-dev
     qt5-default
     qttools5-dev
     curl
    
  3. Clone OpenFOAM repositories (recommended installation directory $HOME/OpenFOAM): git clone https://github.com/OpenFOAM/OpenFOAM-9.git git clone https://github.com/OpenFOAM/ThirdParty-9.git

  4. Set the environment variables: source $HOME/OpenFOAM/OpenFOAM-9/etc/bashrc

  5. Compile Scotch/PT-Scotch: Run the Allwmake script in $HOME/OpenFOAM/ThirdParty-9

  6. Compile OpenFOAM: Run the Allwmake script in $HOME/OpenFOAM/OpenFOAM-9

  7. Compile ParaView: Run the makeParaView script in $HOME/OpenFOAM/ThirdParty-9

picFoam installation

Run the Allwmake script inside the picFoam directory.


picFoam tutorials

To run a tutorial execute the respective run.sh script. By default meshes are constructed with blockMesh, but Gmsh geometry files are also included.

If you wish to use the Gmsh geometry, installation of Gmsh version 3.0.6 is recommended. For newer versions run Gmsh with -format msh22 to output an older mesh format, which OpenFOAM can handle.


picFoam extension

If you wish to extend picFoam with new submodels see the file EXTENSION_INSTRUCTIONS.md.

picfoam's People

Contributors

chriskuehn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

picfoam's Issues

SputterCoeffs is undefined even it has already defined in picProperties

Thank you for providing your code.

I am encountering an error despite configuring the SputterCoeffs in picProperties.

I would greatly appreciate any guidance or suggestions on resolving this issue.

Selecting BoundaryEvent Sputter on patches:
topWall

--> FOAM FATAL IO ERROR:
keyword SputterCoeffs is undefined in dictionary "/home/alllala/OpenFOAM/.../constant/picProperties/BoundaryModels/PatchEventModels"

file: /home/alllala/OpenFOAM/.../constant/picProperties/BoundaryModels/PatchEventModels from line 116 to line 234.

From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const
in file db/dictionary/dictionary.C at line 1008.

FOAM exiting


picProperties

//List of PatchEvent models
PatchEventModels
{
modelList
(
topWall
{
type Sputter;
SputterCoeffs
{
sputterSpecies (e);
initalEnergies (10);
sputterProbability (0.6);
printInfo true;
runningAverage (1e-5);
averageStart (1e-5);
// patchNormal (0 -1 0);
// patchTriFaces (channelTop);
// sputterdParcels (e);
// totalSputterdParcels ();
}

        }

Installation issues

Hi, thanks for producing this software and publishing it as open source, it is much appreciated. I am attempting to install picFoam and am having some issues. I have installed OpenFOAM 8 on Ubuntu 20.04 in my /opt/ directory. I have used several OpenFOAM 8 solvers (e.g. mhdFoam, icoFoam, sonicFoam) and have not encountered problems with my installation. When I run ./Allwmake in the picFoam directory, I get the following error message:

wmake PICMCCFVM
make: *** No rule to make target '/opt/openfoam8/src/OpenFOAM/lnInclude/scalarFwd.H', needed by 'Make/linux64GccDPInt32Opt/parcels/derived/picParcel/picParcel.C.dep'. Stop.
wmake solver/picFoam
make: *** No rule to make target '/opt/openfoam8/src/OpenFOAM/lnInclude/int16.H', needed by 'Make/linux64GccDPInt32Opt/picFoam.C.dep'. Stop.
wmake preProcess/picInitialise
make: *** No rule to make target '/opt/openfoam8/src/OpenFOAM/lnInclude/scalarFwd.H', needed by 'Make/linux64GccDPInt32Opt/makePICInitialiseModels.C.dep'. Stop.

I checked my '/opt/openfoam8/src/OpenFOAM/lnInclude/' directory and could not find these files. I found them in my OpenFOAM 2106 folder (e.g. '/opt/OpenFOAM-v2106/src/OpenFOAM/lnInclude/scalarFwd.H'). I tried copying some files over, but each time I tried to run ./Allwmake I had the same error with a different missing file. This would seem to suggest that either picFoam requires a different version of OpenFOAM, or that my OpenFOAM 8 installation has issues. Any suggestions? Thanks.

picInitialise failed : Particle initialised with a location outside of the mesh.

Hi,Thanks for your open source!
I had a problem when running the ionization.

The terminal shows that ''Particle initialised with a location outside of the mesh'' after inputting picInitialse.
error

I only change the values in blockMeshDict.
blockMeshDict

And then I check the mesh quality is ok.
checkMesh

Hope to receive your reply! Wish you success in your work!

Could picFoam use spatially nonuniform magnetic field?

Thanks for your open source work!
picFoam supports a stationary magnetic field / a constant magnetic field now [1]. Whether B is constant only in time, or const both in time and space?
If picFoam of the current version does not support a spatially non-uniform static magnetic field, do you have a plan to support it?
Since I have little knowledge about openFoam, could you please tell me the possible difficulties in enabling picFoam to support non-uniform magnetic fields? We would like to fork this repository and have a try in the second half of this year if you do not have the plan. (I have the knowledge about ES-PIC/MCC algorithm and code.)

[1] Kühn, Christoph, and Rodion Groll. "picFoam: An OpenFOAM based electrostatic Particle-in-Cell solver." Computer Physics Communications 262 (2021): 107853.

Compiling error (openfoam-8, centos-7, gcc-8.2.0)

When I try to compile picFoam, it gives an error:

./Allwmake
wmake PICMCCFVM
wmake solver/picFoam
wmake preProcess/picInitialise
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=64 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/finiteVolume/lnInclude -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude -I../../PICMCCFVM/lnInclude -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude -L/root/OpenFOAM/root-8/platforms/linux64GccDPInt64Opt/lib -IlnInclude -I. -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude -I/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OSspecific/POSIX/lnInclude -fPIC -c makePICInitialiseModels.C -o Make/linux64GccDPInt64Opt/makePICInitialiseModels.o
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C: In member function ‘virtual void Foam::CountInitialization::initialiseParticles()’:
lnInclude/CountInitialization.C:113:70: error: no matching function for call to ‘Foam::Random::sampleAB(int, Foam::label)’
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
In file included from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxI.H:27,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBox.H:387,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxList.H:37,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/AMIInterpolation.H:54,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/cyclicAMIPolyPatch.H:40,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.C:34,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.H:291,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/particle.H:38,
from ../../PICMCCFVM/lnInclude/picParcel.H:43,
from makePICInitialiseModels.C:26:
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: candidate: ‘template Type Foam::Random::sampleAB(const Type&, const Type&)’
inline Type sampleAB(const Type& a, const Type& b);
^~~~~~~~
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: template argument deduction/substitution failed:
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C:113:70: note: deduced conflicting types for parameter ‘const Type’ (‘int’ and ‘Foam::label’ {aka ‘long int’})
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
lnInclude/CountInitialization.C:199:67: error: no matching function for call to ‘Foam::Random::sampleAB(int, Foam::label)’
label rndCellI = rndGen.sampleAB(0,mesh.cells().size());
^
In file included from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxI.H:27,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBox.H:387,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxList.H:37,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/AMIInterpolation.H:54,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/cyclicAMIPolyPatch.H:40,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.C:34,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.H:291,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/particle.H:38,
from ../../PICMCCFVM/lnInclude/picParcel.H:43,
from makePICInitialiseModels.C:26:
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: candidate: ‘template Type Foam::Random::sampleAB(const Type&, const Type&)’
inline Type sampleAB(const Type& a, const Type& b);
^~~~~~~~
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: template argument deduction/substitution failed:
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C:199:67: note: deduced conflicting types for parameter ‘const Type’ (‘int’ and ‘Foam::label’ {aka ‘long int’})
label rndCellI = rndGen.sampleAB(0,mesh.cells().size());
^
lnInclude/CountInitialization.C:205:62: error: no matching function for call to ‘Foam::Random::sampleAB(int, Foam::label)’
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
In file included from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxI.H:27,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBox.H:387,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/treeBoundBoxList.H:37,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/AMIInterpolation.H:54,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/meshTools/lnInclude/cyclicAMIPolyPatch.H:40,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.C:34,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/Cloud.H:291,
from /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/lagrangian/basic/lnInclude/particle.H:38,
from ../../PICMCCFVM/lnInclude/picParcel.H:43,
from makePICInitialiseModels.C:26:
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: candidate: ‘template Type Foam::Random::sampleAB(const Type&, const Type&)’
inline Type sampleAB(const Type& a, const Type& b);
^~~~~~~~
/okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/src/OpenFOAM/lnInclude/Random.H:129:25: note: template argument deduction/substitution failed:
In file included from lnInclude/CountInitialization.H:90,
from makePICInitialiseModels.C:36:
lnInclude/CountInitialization.C:205:62: note: deduced conflicting types for parameter ‘const Type’ (‘int’ and ‘Foam::label’ {aka ‘long int’})
label rndTetI = rndGen.sampleAB(0,cellTets.size());
^
make: *** [Make/linux64GccDPInt64Opt/makePICInitialiseModels.o] Error 1

I could not find a solution. My opemfoam-8 bashrc script is:

source /okyanus/progs/OpenFOAM/8.x-20220217.git-picFoam/OpenFOAM-8/etc/bashrc WM_LABEL_SIZE=64 WM_MPLIB=OPENMPI

Thanks.

Picinitialise errors

Hello, I've been trying to run the ionization tutorial. So, I modified the geometry as shown in the case attached.
However, I'm getting errors and not sure how I could save them. Not sure if this type of geometry modification would make any sense. Thanks.

When I run picInitialise:
Create time

Create mesh for time = 0

Initialising pic for Time = 0

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib64/libc.so.6"
#3 Foam::cyclicFvPatch::makeWeights(Foam::Field&) const at ??:?
#4 Foam::surfaceInterpolation::makeWeights() const at ??:?
#5 Foam::surfaceInterpolation::weights() const at ??:?
#6 Foam::fvPatch::weights() const at ??:?
#7 Foam::coupledFvPatchField::evaluate(Foam::UPstream::commsTypes) at ??:?
#8 Foam::cyclicFvPatchField::cyclicFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?
#9 Foam::fvPatchField::adddictionaryConstructorToTable<Foam::cyclicFvPatchField >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::dictionary const&) at ??:?

and then of course picFoam does not run;

Screenshot 2023-08-11 at 9 11 07 AM

Any help would be greatly appreciated. Thanks
grid.zip

How to install picFoam?

Hi, I am new to OpenFoam environment, but my research involves studying plasma. I would like to know how to install picFoam.
Can someone suggest the procedure to install this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.