openfoam4iranian | Unsorted

Telegram-канал openfoam4iranian - OpenFOAM

-

برای ارتباط با ادمین: @NimaSamkhaniani سایت شخصی: NimaSamkhaniani.ir آشنایی با نرم افزار اپن فوم: Www.openfoam.blogfa.com

Subscribe to a channel

OpenFOAM

🔴 How To Install BLAS/LAPACK in Ubuntu 20.04 LTS
https://www.youtube.com/watch?v=YFcETdYO8aw

🔴 How to Install PETSc in Ubuntu 20.04 LTS
https://www.youtube.com/watch?v=ZYaus058rf0

Читать полностью…

OpenFOAM

🔴 Fish passage simulation

✴️ keep the water level constant

✴️ reduce the air velocity in free surface simulation! (manipulation)

https://www.linkedin.com/posts/nicolas-diego-badano_openfoam-github-cfd-ugcPost-7028680733426597888-VgEC


code:
https://github.com/nicolasbadano/fishpassage

Читать полностью…

OpenFOAM

🔴 How to install doxygen when OpenFOAM is intalled in Opt
#doxygen

1- change access to the root:

sudo -i

2- go to doxygen directory:

cd /opt/openfoam8/doc/Doxygen

3- source the .bashrc file to load environment variables:

source ../../etc/bashrc

4- then compile the code, the compilation takes several minutes

./Allwmake

5- After compilation, exit the root profile

exit

To use the doxygen, then run open the index.html with firefox or any web browser software.
or you can add the following in the .bashrc:

alias of8_doxygen='cd /opt/openfoam8/doc/Doxygen && firefox html/index.html'


Then you can recall it from the terminal using the command:

of8_doxygen

Читать полностью…

OpenFOAM

some swak4Foam utilities:

🔴groovyBC: write a new mixed-BC

🔴replayTransientBC Utility to quickly test whether a groovyBC gives the expected results

- add replayTransientBCDict to system directory, then run:

replayTransientBC


🔴 fieldReport: return some packed information about the field e.g max/min/average

fieldReport U -latestTime
fieldReport U -time 100:

🔴 funkySetField:
1- apply non-uniform initial condition with option -time 0
2- employed to do post-processing using option -create, create new field from saved data. e.g

calcFahrenheit
{
field TFahrenheit;
create true;
expression "T*9/5 -459.67";
valuePatches ( frontAndBack hot cold topAndBottom);
dimension [0 0 0 1 0];
//aliases {mu thermo:mu;};
}

🔴 funkySetBoundaryField: to apply non-uniform BC for specific patch e.g.

the inletOutlet condition looks like that:

type inletOutlet;
phi phi;
inletValue uniform 0;
value uniform 0;

then using funkySetBoundaryField, you can apply a non-uniform inletValue. for that you need to provide a funkySetBoundaryDict in system directory

test
{
field U;
expressions
(
{
target inletOutlet;
patchName outlet;
variables (
"Ymax=max(pts().y);"
"Ymin=min(pts().y);"
"h=(Ymax+Ymin)/2;"
);
expression "pos().y > h ? vector(0,0,0) : vector(1,0,0)";
}
);
}
🔴 writeBoundarySubfields : test the above functionality , so it return the non-uniform field as a separate field which can be visualized in the para-view e.g

writeBoundarySubfields -time 0 -subfields "inletValue:vector" U

🔴 expressionField: returns a run-time new field

viscousDissipation
{
type expressionField;
fieldName viscousDissipation;
expression "mu*(grad(U) && grad(U))";
verbose true;
autowrite true;
dimension [0 2 -2 0 0 0 0]; //check

aliases {mu thermo:mu;};
}

🔴 readAndUpdateFields with the aid of groovyBC can be used to calculate new fields. example:
- add new field e.g. heatFlux in 0 directory with appropriate groovyBC expression.
...
"(hot|cold)"
{
type groovyBC;
//variables "k=10;";
valueExpression "k*snGrad(T)";
value uniform 307.75; // 34.6 degC
}
...

then add this function into controlDict
readHeatFlux
{
type readAndUpdateFields;
fields (
heatFlux
);
writeControl timeStep;
writeInterval 1;
correctBoundary no;
}

🔴 listRegisteredObjects : returns the list of object which can be accessed on the run-time.
whatIsThere {
type listRegisteredObjects;
}

#swak4Foam

Читать полностью…

OpenFOAM

🔴 Install salome-9.9 on ubuntu 20.04 LTS

1-download salome (Ubuntu 20)
https://www.salome-platform.org/?page_id=15

2- extract the zip file
tar -xvf SALOME-9.9.0-native-UB20.04-SRC.tar.gz

3- move the files into path home/programs (optional)
4- go to installation directory and run installation
./env_launch.sh
./install_bin.sh

5- Install missing libraries in my case, the missing libraries were:
apt install build-essential -y
apt install pip libboost-all-dev libqwt-qt5-dev libglu1-mesa-dev -y
apt install libqt5printsupport5 libqt5test5 libqt5x11extras5-dev -y
apt install libqt5help5 libfreeimage-dev libxmu-dev libtbb-dev liblapack-dev -y
apt install libopenblas-dev libtbb-dev libfreeimage-dev libfreeimageplus-dev libcminpack-dev -y
apt install python3-sip python3-pyqt5
pip install psutil

6- run Salome from installation directory with the command
./salome


if you have further missing library (e.g. libname.so) , then use two following commands to find and install the requirement packages.
find the packages where this library is available:
apt search libname

install the packages (you need to have root or admin permission):

sudo apt install packagename

Читать полностью…

OpenFOAM

🔴 New Version of OpenFOAM (ESI-group version) is released

🌐 https://www.openfoam.com/news/main-news/openfoam-v2206


you can install it on ubuntu (18.04, 20.04 and 22.04) LTS with the following commands:

curl https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2206-default


Then start the shell session with:
openfoam2206


#OpenFOAM #installation #ubuntu

Читать полностью…

OpenFOAM

🔴PythonFoam


#python #openfoam

https://www.alcf.anl.gov/support-center/training-assets/alcf-pythonfoam-workshop-0

Читать полностью…

OpenFOAM

🔴 Seminar Series: OF for Combustion

#CFD #OpenFOAM #seminal

https://blog.nus.edu.sg/huangwei/of4combust/

Читать полностью…

OpenFOAM

🔴 ورود شبکه از نرم افزارهای مش زنی به اپنفوم

https://youtu.be/hHoyS2-qnLQ

Читать полностью…

OpenFOAM

🔴install foam-extend-4.0 on ubuntu20.04LTS

1- install g++-5 and gcc-5
https://askubuntu.com/questions/1235819/ubuntu-20-04-gcc-version-lower-than-gcc-7

2-follow the instruction for ubuntu18.04LTS from the following link
https://openfoamwiki.net/index.php/Installation/Linux/foam-extend-4.0/Ubuntu#Ubuntu_20.04


#foam-extended-4.0

Читать полностью…

OpenFOAM

🔴 linux tip

connect through ssh to the host for the first time

1- generate the ssh key on your computer with the command:
ssh-keygen

This command makes a folder called .ssh in the home folder and two files id_rsa.pub and id_rsa.

2-id_rsa.pub is public key and the id_rsa is private key. Never share the private key!

3- copy the id_rsa.pub to the host (server) in the file .ssh/authorized_keys

now you must have access to the host with the command

ssh username@public_Ip

to configure the public ip of the host, you can use the following command:

ifconfig -a

or

curl ifconfig.me

Читать полностью…

OpenFOAM

introduction to Lattice Boltzmann Method


#LBM
https://www.youtube.com/watch?v=qhr3pOaShjg

Читать полностью…

OpenFOAM

🔴 funkyDoCalc

If you missed run-time processing by an accident, and you don’t like to redo the simulations you may still can derived some results from saved data in time directories. funkyDoCalc is one of utilities accompanied with the package swak4Foam


http://nimasamkhaniani.ir/openfoam/funkydocalc-for-openfoam-post-processing/

Читать полностью…

OpenFOAM

سلام به دنبال کنندگان کانال اپنفوم
تصمیم دارم برخی از ویدیوهایی که قبلا برای آموزش اپنفوم ضبط کرده بودم را از طریق کانال یوتیوبی به اشتراک بذارم.
این آموزش ها جدید نیستند (دو سه سال پیش ضبط شده اند) اما همچنان اطلاعات زیادی در مورد اپنفوم می تونه در اختیار کاربران تازه کار اپنفوم قرار بده.
امیدوارم که این آموزشهای کوتاه مسیر یادگیری اپنفوم رو بتونه براتون تسریع کنه.

🔻لیست ویدیوها بروز خواهد شد.
#youtube #OpenFOAM_training

۱-معرفی ورژنهای مختلف اپنفوم و نصب آن بر روی سیستم عامل لینوکس (اوبنتو)
https://youtu.be/GkkhdkjSfJo

۲- نحوه ی نصب swak4Foam بر روی اپنفوم
https://youtu.be/tKk5_xuw5HA

۳-ساختار اپنفوم پس از نصب
https://youtu.be/O3axu_3tdg0

۴- ساختار حل مساله در اپنفوم
https://youtu.be/IVau7mjWhnU

۵- اولین شبیه سازی با اپنفوم
https://youtu.be/SyslaSYLals

۶- شبیه سازی جریان آشفته با اپنفوم (قسمت اول)
https://youtu.be/kkEm8_RS40I

۷-ورود شبکه از نرم افزارهای مش زنی به اپنفوم
https://youtu.be/hHoyS2-qnLQ

Читать полностью…

OpenFOAM

🔴 Now! OpenFOAM book tutorials in github
git clone https://github.com/NimaSam/OpenFOAM_tutorials.git

🔴 More details about the book can be found here:
http://nimasamkhaniani.ir/openfoam/numerical-simulation-using-openfoam/

#OpenFOAM_book #OpenFOAM_training #OpenFOAM_tutorials

Читать полностью…

OpenFOAM

🔴 List of Open Source softwares in CAE:

https://www.cfdsupport.com/cae-open-source-software.html

Читать полностью…

OpenFOAM

🔴 کتاب آموزش اپنفوم 9 از طریق حل مساله بصورت آنلاین عرضه شد.

بخش احتراق با همکاری دوستان خوبم سبحان امامی و علیرضا علیپور مورد بازنگری و بروزرسانی قرار گرفته است.
سایر بخشها به اپنفوم 9 ارتقا یافته است و سعی شده تا مواردیی که در نسخه های جدیدتر اپنفوم ارائه شده تا حد امکان در کتاب گنجانده شود.

پیشاپیش از بازنشر و به اشتراک گذاری کتاب سپاسگزارم.


✴️ دریافت فایل pdf کتاب:
http://dx.doi.org/10.13140/RG.2.2.25519.61601

✴️ دریافت فایلهای شبیه سازی:
https://github.com/NimaSam/OpenFOAM_tutorials


#OpenFOAM #book #userguide

Читать полностью…

OpenFOAM

🔴Turbulence Models

source:
https://personalpages.manchester.ac.uk/staff/david.d.apsley/turbmod.pdf

Читать полностью…

OpenFOAM

🔴 Linux command line cheat sheet

Читать полностью…

OpenFOAM

🔴 Check my latest publication about vapor bubble condensation in #openaccess #journal_thermo to find a semi-analytical solution of bubble lifetime.

https://www.mdpi.com/2673-7264/2/3/12/htm


#OpenFOAM #condensation #VoF #interFoam

Читать полностью…

OpenFOAM

🔴 Book example files are now updated to OpenFOAM-9

https://github.com/NimaSam/OpenFOAM_tutorials

Main changes:
- turbulenceProperties is replaced with momentumTransport
- DPMFoam and MPPICFoam is replaced with denseParticleFoam
- Some minor changes in reactingFoam and chtMultiRegion case setup

to access the files

git clone https://github.com/NimaSam/OpenFOAM_tutorials.git

Читать полностью…

OpenFOAM

🔴 Water polynomial properties

#water #thermoPhysicalProperties

https://holzmann-cfd.com/community/blog-and-tools/cae-blog/thermophysical-properties-water

Читать полностью…

OpenFOAM

🔴Notes on Computational Fluid Dynamics: General Principles

#CFD #OpenFOAM #book

https://doc.cfd.direct/notes/cfd-general-principles/

Читать полностью…

OpenFOAM

🔴 use doxygen for OpenFOAM:

- online version:
https://cpp.openfoam.org/v9/

- offline version:

1-install packages:
sudo apt-get install doxygen graphviz

2- compile
cd $WM_PROJECT_DIR/doc/Doxygen
.
/Allwmake

3- run
firefox html/index.html

it can not create the files in Opt as it is written-protected.

Читать полностью…

OpenFOAM

🔴 Check my presentation on #eurotherm2021 about direct numerical simulation of drop impact on solid with OpenFOAM
The solver development (#phaseFieldFoam) is a part of joint project between #KIT and #TU_Darmstadt

#OpenFOAM #phaseFieldFoam

https://www.youtube.com/watch?v=tAajkyy7NsY

Читать полностью…

OpenFOAM

🔴linux tip

When you are Installing linux on a new made laptop, it is most likely that the wireless is not working. Therefore, you must try LAN or connect with tethering via mobile then install the proper driver for wireless.

In Ubuntu, first check for additional driver in software&update, if there was no driver for wireless, then you must look thoroughly the Linux forums to find a solution. For example in my case, WiFi is not working with Ubuntu 18.04 LTS, 20.4 LTS or Ubuntu 21.04 (latest Ubuntu version), I find the following solution is working for me (Lenovo Thinkpad L15 gen 2).

#wifi #ubuntu

https://askubuntu.com/questions/1352260/wifi-adapter-not-found-realtek-10ec8852-on-ubuntu-21-04/1352314#1352314?newreg=f7f2d0a036764e07b9a3dad7e03f5c13

Читать полностью…

OpenFOAM

#OpenFOAM_8 #userguide

https://cfd.direct/openfoam/user-guide/

Читать полностью…

OpenFOAM

🔴 آموزش نحوه ی نصب سواک بر روی اپنفوم
#youtube #OpenFOAM_training

https://youtu.be/tKk5_xuw5HA

Читать полностью…

OpenFOAM

🔴 A really cool and interesting library to include material properties. look following links for python :

http://www.coolprop.org/coolprop/wrappers/Python/index.html#python

install the python library using pip:
pip install CoolProp

usage example:

from future import print_function
from CoolProp.CoolProp import PhaseSI, PropsSI, get_global_param_string
iec = PropsSI('isobaric_expansion_coefficient','T',296.85,'P',101325,'R11')
#saturation uses Q =1 liquid side and Q=0 vapor side
st = PropsSI('surface_tension','P',101325,'Q',1,'R11')
print ("isobaric_expansion_coefficient", iec)
print ("surface_tension", st)

for other programming languages such as c++, c# and matlab check it's website.

#materialProperties #thermodynamicProperties

Читать полностью…

OpenFOAM

✅ Install rheoTool of OpenFOAM 7 on ubuntu 18.04:
before starting to install rheoTool, load the OpenFOAM

1- download rheoTool
git clone https://github.com/fppimenta/rheoTool.git

2- In rheoTool directory, go to directory of7
3-
./downloadEigen

4- add the address to .bashrc (check the correct path on your computer!)
echo "export EIGEN_RHEO=/home/nimasam/OpenFOAM/nimasam-7/ThirdParty/Eigen3.2.9">>/home/nimasam/.bashrc

5- ./installPetsc
6- cd src
7- open new tab and then
./Allwmake

🔴 Hint: if you have multiple OpenFOAM versions on your operating system, then you need to modify the .bashrc. e.g like this:

export EIGEN_RHEO=/home/nimasam/OpenFOAM/nimasam-7/ThirdParty/Eigen3.2.9
export PETSC_DIR=/home/nimasam/OpenFOAM/nimasam-7/ThirdParty/petsc-3.13.3
export PETSC_ARCH=arch-linux-c-opt
alias of7='source /opt/openfoam7/etc/bashrc; export LD_LIBRARY_PATH=$PETSC_DIR/$PETSC_ARCH/lib:$LD_LIBRARY_PATH'


#rheoTool #viscoelastic

Читать полностью…
Subscribe to a channel