|
[Sponsors] |
[swak4Foam] Problem with funkySetFields: How to set field on patch? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 3, 2011, 13:53 |
Problem with funkySetFields: How to set field on patch?
|
#1 |
New Member
Join Date: Nov 2009
Location: Germany
Posts: 8
Rep Power: 17 |
Hello,
I have some problems with funkySetFields. I want to set a fully developed velocity profile on my inlet. But after running funkySetFields -time 0 the file 0/U contains a filed for the whole mesh and my entry for Inlet is even the entry before using FSF. My funkySetFieldsDict: surface { field U; expression..... valuePatches (inlet); keepPatches 0; } Thanks and regards Daniel |
|
March 3, 2011, 17:44 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard PS: for just setting patch-values there is a utility funkySetBoundaryFields in the swak4Foam-suite. |
||
May 5, 2011, 06:49 |
|
#3 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 |
...referring to the last post:
http://www.cfd-online.com/Forums/ope...tml#post306326 Ok, Berhard. Now it works really well!! Thank you. But there is one further I don't understand so far. If I apply the following expression: "faceAverage(fpos().z <= surf(3.) ? surf(1.0) : surf(0.))" the red part determines at which height the free surface will be set - in this case at 3m. This is ok for simply horizontal initial free surfaces. In the case I want to apply an inital free surface that varies over lenght i.e. along a slope (pic illustrates the problem), I have to insert a linear function f(z)=m*x+n. But the expression doesn't accept this: "faceAverage(fpos().z <= surf(-m*pos().x+n) ? surf(1.0) : surf(0.))" Whereas the condition accepts it without any problem. Is there any solution for this problem? |
|
May 5, 2011, 12:41 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
What is the error message? Without it I can't do much and I don't have the time to test the expressions "by hand" BTW: If thing the better variant (I'm doing this from memory the syntax might be slightly different) would be in my opinion "<= surf(42.)+fpos().x*surf(13.)" with the values 13 and 42 for m and n |
||
May 6, 2011, 10:45 |
|
#5 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 |
...the problem is solved. Your hint....
BTW: If thing the better variant (I'm doing this from memory the syntax might be slightly different) would be in my opinion "<= surf(42.)+fpos().x*surf(13.)" with the values 13 and 42 for m and n led me to the solution. It was just a synthax error. Thank you Bernhard!! Best, Toni |
|
Tags |
boundary, fsf, funkysetfields, patch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) | Aadhavan | OpenFOAM Meshing & Mesh Conversion | 2 | March 8, 2018 02:47 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
[snappyHexMesh] determining displacement for added points | CFDnewbie147 | OpenFOAM Meshing & Mesh Conversion | 1 | October 22, 2013 10:53 |
[GAMBIT] periodic faces not matching | Aadhavan | ANSYS Meshing & Geometry | 6 | August 31, 2013 12:25 |