|
[Sponsors] | |||||
|
|
|
#1 |
|
New Member
Oğuzhan Demir
Join Date: Dec 2016
Posts: 19
Rep Power: 11 ![]() |
Hi,
I would like to initialize my velocity field (U) with a function, for example a sine function depending on x-coordinate of the cell. Is there a way to do that? I am using OF-4.0.x version. Thanks in advance. Oguzhan |
|
|
|
|
|
|
|
|
#2 |
|
New Member
Join Date: Mar 2015
Posts: 16
Rep Power: 12 ![]() |
Hi,
You can use funkySetFields from swak4foam to do that. |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 22 ![]() |
To add to that, here is a small example to initialise a spherical bubble in interFoam:
Code:
funkySetFields -latestTime -keepPatches -field alpha.water -expression "sqr(pos().x-0)+sqr(pos().y-0)+sqr(pos().z-.00150)<sqr(0.0005)?0:1" |
|
|
|
|
|
|
|
|
#4 |
|
New Member
Oğuzhan Demir
Join Date: Dec 2016
Posts: 19
Rep Power: 11 ![]() |
Thanks for your advise. But I am unable to install swak4Foam for my current OpenFOAM 4.xx version. Any tips?
Oguz |
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 22 ![]() |
||
|
|
|
|
|
|
|
#6 | |
|
New Member
Oğuzhan Demir
Join Date: Dec 2016
Posts: 19
Rep Power: 11 ![]() |
Quote:
https://openfoamwiki.net/index.php/I...opment_version and https://openfoamwiki.net/index.php/I...tion/swak4Foam but couldn't install and compile it. I know that it may be a simple problem but could you help on that? Thanks a lot man. |
||
|
|
|
||
|
|
|
#7 | ||
|
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 22 ![]() |
Quote:
Quote:
Where exactly does it fail? What is the error? |
|||
|
|
|
|||
|
|
|
#8 |
|
New Member
Oğuzhan Demir
Join Date: Dec 2016
Posts: 19
Rep Power: 11 ![]() |
I have installed swak4Foam correctly and solved my problem. Thanks.
Oguz |
|
|
|
|
|
|
|
|
#9 |
|
Member
Vedamt Chittlangia
Join Date: Feb 2016
Posts: 64
Rep Power: 10 ![]() |
Hello Oğuzhan,
How did you install it swak4Foam? can you post the link? Thanks |
|
|
|
|
|
|
|
|
#10 | |
|
New Member
Oğuzhan Demir
Join Date: Dec 2016
Posts: 19
Rep Power: 11 ![]() |
Quote:
https://openfoamwiki.net/index.php/I...opment_version https://openfoamwiki.net/index.php/C...m/Installation You may have problems regarding to bison, you can install it using the instructions also. Oguzhan |
||
|
|
|
||
![]() |
| Tags |
| function, nonuniform, openfoam |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
| cannot find grid field function in custom field function | mehdiataei | FLUENT | 0 | March 19, 2017 05:53 |
| [snappyHexMesh] How to define to right point for locationInMesh | Mirage12 | OpenFOAM Meshing & Mesh Conversion | 7 | March 13, 2016 15:07 |
| OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
| latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |