unnamedmoose / basicopenfoamprogrammingtutorials Goto Github PK
View Code? Open in Web Editor NEWIntroduces basic C++ concepts to beginner users of the OpenFOAM open-source CFD libraries.
License: GNU General Public License v3.0
Introduces basic C++ concepts to beginner users of the OpenFOAM open-source CFD libraries.
License: GNU General Public License v3.0
Could you elaborate also on how to consolidate/process lists across multiple processes.
I have to work a lot with matrix sections e.g. conversion of lower in COO format for further processing but am getting stuck e.g. with the local addressing at processor level when the case is decomposed.
Where are the global addresses?
I would appreciate if you could shed some light on that.
In the tutorial 4, line 113:
112 // In Python, this is equivalent to:
113 // np.sqrt(np.sum(x0-x)**2)
There is a typo in the comment, because the python expression computes the square root of the square of the sum that is the sum itself. Instead, we should calculate the square root of the sum of squares, it must changed to:
113 // np.sqrt(np.sum((x0-x)**2)) << by adding paraenthesis inside sum function
Suggestion:
Instead of defining Pi using:
#define PI_ 3.1415......
It is more convenient to use OpenFOAM constants:
scalar PI_ = Foam::constant::mathematical::pi
In typical pipe flow, the velocity profile will become the pattern
similar to the red line in the following plot.
Usually, people apply a fixed value velocity at inlet. Then start the
steady-state simulation (e.g., simpleFoam). The velocity profile will
look like the red line.
So, in what kind of situation, we need to prescribe such a velocity
profile (blue line)?
An error is produced for OpenFOAM v2106 as follows:
customActuationDiskSource.H:73:10: fatal error: fvModel.H: No such file or directory
73 | #include "fvModel.H"
An error is produced for OpenFOAM 9 :
wmakeLnInclude error: base directory /opt/openfoam9/src/fvOptions/ does not exist
I'm not sure how I can get this tutorial to compile. I have added fvModel.H directly into the directory, but then it needs fvModelM.H. I feel like it should be able to find this header file but just isn't?
I compiled your interpolation scheme successfully, but when I'm trying to use it with my mesh (1D mesh with 150 cells) I got a fatal error saying that 'attempt to read beyond EOF'. Did you experienced something similar with your code when using other mesh then the one in your test case? Im using the openFOAM.com distribution v2012.
Hello,
Thank you ver y much for the great work!
I have seen this post on cfd-online: https://www.cfd-online.com/Forums/openfoam-programming-development/182107-fvmatrix-fvoptions-susp-automatic-implicit-explicit-source-term-treatment.html
And I thought it would be very helpful to include it in this repository.
Many thanks
Hi Artur!
I am ur fan Ramkumar, hope u remember me.
I am on a new tutorial now and for that i need some guidance on compiling a custom interpolation function that i can use on fvSchemes file. could u plz guide me to a simple example or a set of instructions on compiling one?.. a simple example will do and i believe i can build up on that.. and u know to whom i am making the tutorial for :) ... could u plz guide me on this?
Hi,
first of all.. its an excellent job from u.. it helped me a lot to learn OpenFOAM C++.. i am also like u, a self-taught person..
by the way, using the knowledge gained from ur tutorials, i have created a simple solver code, that solves wave equation.
i felt like it would be much useful for new coders and would like to add it to ur collection..
is it possible to do so?
Hello Artur,
this is a request for an additional tutorial diving deeper into parallel computations. It's a bid related to your comment in tutorial 5 "// Custom reduction operations are easy to implement but need fluency in // object-oriented programming in OpenFOAM, so we'll skip this for now."
What I want to gain from such a tutorial is an idea about how to link/integrate computations of n specific processes (NOT ALL THE PROCESSES) which are offloaded to n GPUs?
It's really about the integration with the OF standard functionality, not about how offloading computations to the GPU works. E.g. if there are 4 CPU MPI processes, CPU processes p0 (master), p1, p2, p3 where p2 <-> offloads computations to GPU0 and p3 <-> offloads computations to GPU1. Relevant operations are processor interface updates after mv multiplications and global communications when computing the norm, alpha and beta depending on relevant BLAS operations.
Thanks for your tutorials!
Klaus
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.