|
[Sponsors] |
February 4, 2020, 11:46 |
funkySetFields setup
|
#1 |
Senior Member
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8 |
Hi FOAMers!
I'm think I've successfully installed swak4foam for OF6. However, it's not clear to me how to initialize pressure, velocity, and the phase. Does anyone have a tutorial? I've been reading here but I am a little confused exactly how to format things. Is there an extra file I need to put in a dictionary, or do I modify current dictionaries? If anyone has a simple case file for running a test case that serves as a good template, I'd really appreciate it. |
|
February 5, 2020, 18:16 |
|
#2 |
Senior Member
Josh McCraney
Join Date: Jun 2018
Posts: 220
Rep Power: 8 |
A senior member of this community was nice enough to help me out (not sure if I should list names?). At any rate, for clarity, this is how you run funkySetFields:
1) in the "system" directory, copy the setFieldsDict as a funkySetFieldsDict via >> cp setFieldsDict funkySetFieldsDict 2) delete all lines of funkySetFieldsDict and replace with what you want, for example: /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object funkySetFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // expressions ( initFieldAlpha//JMC: INITIALIZE DATA (SIMILAR TO defaultFieldValues) { field alpha.water; expression "0"; keepPatches true; } initFieldU//JMC: INITIALIZE DATA (SIMILAR TO defaultFieldValues) { field U; expression "vector(0.0,0.0,0.0)"; keepPatches true; } pressureAir//JMC: INITIALIZE DATA (SIMILAR TO defaultFieldValues) { field p_rgh; expression "0"; keepPatches true; } floatingCircle { field alpha.water; expression "1"; condition "sqrt(pow((pos().x-0.14),2)+pow((pos().y-0.2),2))<0.05"; keepPatches true; } pressureCircle { field p_rgh; expression "100.0*pos().y"; condition "sqrt(pow((pos().x-0.14),2)+pow((pos().y-0.2),2))<0.05"; keepPatches true; } risingCircle { field U; expression "vector(0.0,1.5,0.0)"; condition "sqrt(pow((pos().x-0.14),2)+pow((pos().y-0.2),2))<0.05"; keepPatches true; } ); // ************************************************** *********************** // 3) now go into the case file, and as usual run >> blockMesh >> funkySetFields -time 0 IMPORTANT, RUN THIS INSTEAD OF setFields, WHERE -time 0 STIPULATES WHERE TO BEGIN THE IC >> interFoam All done! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] how to use funkySetFields function in muliregion case | bryant_k | OpenFOAM Community Contributions | 15 | October 15, 2021 02:50 |
[swak4Foam] funkySetFields and funkySetBoundaryFields | zxj160 | OpenFOAM Community Contributions | 19 | February 14, 2018 19:07 |
2D Glass Melt Simulation Setup | marmz | FLUENT | 5 | October 9, 2016 15:25 |
[ICEM] surface/curve mesh setup | Studi | ANSYS Meshing & Geometry | 15 | November 12, 2014 00:32 |
[ICEM] Hexa mesh, curve mesh setup, bunching law | Anorky | ANSYS Meshing & Geometry | 4 | November 12, 2014 00:27 |