|
[Sponsors] |
Initial Condition for alpha (VOF) using funkySetFields/swak4Foam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 29, 2013, 08:04 |
Initial Condition for alpha (VOF) using funkySetFields/swak4Foam
|
#1 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Hi all,
I have following problem: I want to simulate how a liquid runs out of a (car) door sill. The door sill is kind of box-shaped, but unfortunately only kind of: The left and the right side have different heights, the left side and right side are not perpendicular to the bottom, with each side being differently. Unfortunately I am not allowed to post picture here. The door sill itself is located in a larger box which is my computational area. I now want to impose a initial condition for alphawater such that the door sill is filled to a certain percentage with my liquid. Basically I need to know which cell is inside the door sill and which cell is outside. I generate my mesh using snappyHexMesh and reading in STL data. With funkySetFields I can make a logical expression in the form of "(pos().x > 1.487) && (pos().x < 3.052)" [...] but that is not sufficient. Any ideas anyone? Thanks, Stefan |
|
July 29, 2013, 14:14 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
And in case of "I am not allowed to post of picture here" consider getting a support contract with someone who can help you. The topic (car) and the town (Stuttgart) suggest that you're not working for someone who can't afford it
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
July 29, 2013, 14:37 |
|
#3 | |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Quote:
And by the way - no- I am not working for the company you are assuming, neither directly nor doing project work for them. |
||
July 30, 2013, 05:19 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Much better. Is the outer basin essential, or could you just drain into "infinity" instead?
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
July 30, 2013, 05:33 |
|
#5 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Hi Anton,
for the first period of the process (which is the draining part) it is not necessary, for the second period (when the last drops come out) I need at least the bottom side. Stefan |
|
July 30, 2013, 05:40 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
An idea might be to just have the door sill alone and initialize it, and then use mapfields to a domain containing the outer box.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
July 30, 2013, 05:59 |
|
#7 | |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Quote:
I think about it again - thanks for your idea! |
||
July 30, 2013, 07:56 |
|
#8 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Is there a way to mark the "inner" region in the mesher and then write it out as a cellZone/cellSet? Because then setting the liquid only inside would be as simple as "(zone(inner) && pos().z<maxZ && pos().z>minZ) ? 1 : 0"
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
July 30, 2013, 11:09 |
|
#9 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
I have tried the following:
Wrap the door sill only with large meshsize (-> holes get closed), use convex hull (-> really big holes get closed). This gave me a coarse closed volume, which I could use in snappyHexMesh. Next steps: - funkySetFields (as before, only looking at the z-axis) - mapFields to my "old" fine case When looking now at my initial solution at t=0 I am quiet happy with the result. However, my computation now diverges quickly (which did not happen before - my previous initialization were two approximated boxes with different height). @Bernhard: I have found no way to generate a cellset of the inside of the door sill - so far I tried only opensource-software to prepare the surfaces and SHM to generate a volume mesh. Thanks for you answers, I have now a better initial condition - although a different new problem |
|
July 30, 2013, 14:01 |
|
#10 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
SHM has the ability to generate cellZones. See the snappyHeater (or so) tutorial
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
August 2, 2013, 06:08 |
|
#11 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Hi all,
just a quick update: I've played around with cellSets (separately or within SHM) but none of this seems to work in my case. The (as of today) best way to generate an initial condition for alphawater seems to be: - generate a closed version of the door sill - funkySetFields with pos().z < <some value> - go to the "big" case - mapFields <from closed version> - funkySetBoundaryField with expression "internalField(alphawater)" --> the liquid looks pretty good afterwards, unfortunately I get convergence problems due to the mapping (I assume) Stefan P.S. Is there any way to include the boundary condition "constantAlphaContactAngle" within swak4Foam? |
|
August 2, 2013, 07:24 |
|
#12 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
What do you mean with "include"?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
August 2, 2013, 08:38 |
|
#13 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
If I use funkySetFields on 0/alphawater, where I use the BC (for example)
Schweller_Schweller_links { type constantAlphaContactAngle; theta0 50; limit gradient; value uniform 0; } funkySetFields complains about the used type, gives me a overview about the correct ones (e.g. zeroGradient and some 50 others) and stops. I have to change the type to zeroGradient, use funkySetFields, and switch back to constantAlphaContactAngle. By "include" I mean: How and where do I include $FOAM_SRC/transportModels/twoPhaseProperties/lnInclude such that funkySetFields does not complain anymore? |
|
August 3, 2013, 06:34 |
|
#14 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|||
August 5, 2013, 06:55 |
|
#15 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Thank you very much for your help - it actually was "libtwoPhaseProperties.so" I had to declare in my controlDict.
You're right about the description of the problem (in text or by a sketch). I'll try my very best in the future. |
|
August 6, 2013, 04:44 |
|
#16 |
New Member
Stefan Hildenbrand
Join Date: Aug 2009
Location: Stuttgart, Germany
Posts: 24
Rep Power: 17 |
Hi all,
my final comment for future reference. The way I get my computation converging is slightly different as posted above. It is - generate a closed version of the door sill - funkySetFields with pos().z < <some value> - go to the "big" case - mapFields <from closed version> - generate cellZone of cells near walls of door sill faceSet f0 new patchToFace <Patches>- use funkySetFields with condition "(zone(c0Zone))" to set alpha=0 there - run case Apparently my divergence problems came from alpha=1 at some outlet holes in the door sill. Thanks again for the help. Stefan |
|
Tags |
compressibleinterfoam, funkysetfield, setfields |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Extrusion with OpenFoam problem No. Iterations 0 | Lord Kelvin | OpenFOAM Running, Solving & CFD | 8 | March 28, 2016 12:08 |
Velocity blows up suddenly after 30,000+ iterations | lordvon | OpenFOAM Running, Solving & CFD | 15 | October 19, 2015 14:52 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
pisoFoam - unstable pressure residual | Industrial_CFD | OpenFOAM Running, Solving & CFD | 21 | February 24, 2013 16:39 |
Computational time | sunnysun | OpenFOAM Running, Solving & CFD | 5 | March 16, 2009 04:32 |