|
[Sponsors] | |||||
How to define setFields to have a triangle fluid domain in 2D case? |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
Join Date: Feb 2015
Posts: 4
Rep Power: 12 ![]() |
Hi, every one,
I am just new to OpenFoam and now my case is a inclined rectangular tank with a horizontal water surface(water depth is very low) as the initial condition. But when I go through Dambreaking tutorial, I find that I can only define a box-shape fluid domain rather than a triangle one, which doesnot work in this case. Could anyone please tell me that how to define such a fluid domain as in the pic?shallow water in tank.pdf Any information is appreciated. Thanks! |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
|
Hi,
If your mesh is not inclined, you can use rotated box, so the intersection of the mesh and rotated box is triangle (case A on attached image, search the forum for syntax of rotatedBox in setFields), if your mesh is inclined, you can use just box (case B on attached image). |
|
|
|
|
|
|
|
|
#3 | |
|
New Member
Join Date: Feb 2015
Posts: 4
Rep Power: 12 ![]() |
Quote:
I used the first method u mentioned and it works quite well. Thanks for help! ![]() Best regards |
||
|
|
|
||
|
|
|
#4 |
|
New Member
Join Date: Apr 2018
Posts: 2
Rep Power: 0 ![]() |
Hello
Could someone please help me define a volume of water above a sloped surface? Basically, I need to define a triangular volume of water in setField. Please see the figure attached. Thanks |
|
|
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Dec 2020
Posts: 9
Rep Power: 6 ![]() |
Hello behnazphp
I don't know if after a long time can you reply back to me. but I have a similar issue. could you finally define directly the initial conditions by rotatedboxToCell in setFieldsDic? Thanks |
|
|
|
|
|
|
|
|
#6 | |
|
New Member
Join Date: Dec 2020
Posts: 9
Rep Power: 6 ![]() |
Quote:
I have a similar issue. I want to define a trapezoidal shape initial condition for a dam break problem. This shape is formed from overlapping the Mesh and a rotated box with different alpha values. I tried to do that by defining a rotatedboxTocell in the setFields dictionary. However there is no error in running setField but after that in initial conditions, I can not see any sign of water alpha = 1. Any of you can help me with that? autodraw 1_4_2022.jpg Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 7
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.water 0
);
regions
(
rotatedBoxToCell
{
name rotatedBox1;
type cellSet;
action new;
source rotatedBoxToCell;
origin (0.3 0.2 10);
i (-0.1 -0.1 0);
j (0.1 -0.1 0);
k (0 0 -20);
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);
|
||
|
|
|
||
|
|
|
#7 |
|
New Member
mohammed tareq
Join Date: Apr 2020
Location: TURKEY
Posts: 7
Rep Power: 7 ![]() |
hi xiaor1
can u please explain how u get the triangle box for water area i try use Rotatedbox utility but can not define the i , j ,k vectors |
|
|
|
|
|
![]() |
| Tags |
| setfieldsdict |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Floating point exception: Zero divide | liladhar | CFX | 11 | December 16, 2013 05:07 |
| injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |
| [ICEM] How to define the name of the fluid domain | ztdep | ANSYS Meshing & Geometry | 5 | December 20, 2012 10:13 |
| Free surface boudary conditions with SOLA-VOF | Fan | Main CFD Forum | 10 | September 9, 2006 13:24 |
| UDF FOR UNSTEADY TIME STEP | mayur | FLUENT | 3 | August 9, 2006 11:19 |