CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] FunkySetFields for OF 141

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2008, 06:41
Default Hi Carlo! If the fields rho
  #41
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Carlo!

If the fields rho and pd exist in the time-step you're working on it should be possible. But FSF has no way of reading the densities for the two phases that are represented by gamma

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   July 1, 2008, 13:18
Default Hi, thanks for you answer. I
  #42
New Member
 
Carlo De Angelis
Join Date: Mar 2009
Posts: 10
Rep Power: 17
carlodean is on a distinguished road
Hi, thanks for you answer.
I made something like this:

funkySetFields . Pout -time 0 -field pd -expression '1000*9.81*pos().z' - expression 'pos().z <=386'.


It seems to work fine but i don't know if it's the right way to do it.
Carlo
carlodean is offline   Reply With Quote

Old   July 1, 2008, 14:37
Default Hi Carlo! But instead of th
  #43
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Carlo!

But instead of the second -expression you surly used -condition, didn't you?

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   July 1, 2008, 15:19
Default yes Sorry, I used -condition
  #44
New Member
 
Carlo De Angelis
Join Date: Mar 2009
Posts: 10
Rep Power: 17
carlodean is on a distinguished road
yes Sorry,
I used -condition 'pos().z<=386'.
Is it correct??
Thank you
carlodean is offline   Reply With Quote

Old   July 29, 2008, 08:04
Default Hi! It has been asked at an
  #45
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

It has been asked at another place on the board when FSF will work with 1.5. Well it looks like the 1.4.1-version compiles without modifications on 1.5 (which means: it worked all the time). Nevertheless: if you plan to pull the version from the svn I'd recommend to use the "new" URL as documented on http://openfoamwiki.net/index.php/Co...funkySetFields The "old" URL will be kept for 1.4.1 and will only receive bug-fixes

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   July 31, 2008, 00:11
Default I tried to access the latest F
  #46
Member
 
Dennis Kingsley
Join Date: Mar 2009
Location: USA
Posts: 45
Rep Power: 17
dkingsley is on a distinguished road
I tried to access the latest FSF using the openfoamwiki's pointer to the svn version as the July 29th 2008 post suggests. The svn seems to be down or its configuration has changed.

Can anyone provide an updated link to the svn or a link to FSF source for OF1.5?

dennis
dkingsley is offline   Reply With Quote

Old   July 31, 2008, 05:25
Default According to a Sourceforge-Bul
  #47
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
According to a Sourceforge-Bulletin the sourceforge-svn-server is currently down for maintainance (they are speaking of a 12 hour window, which should be over soon, so be patient)

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   July 31, 2008, 12:30
Default Thanks, I am leaving on vacati
  #48
Member
 
Dennis Kingsley
Join Date: Mar 2009
Location: USA
Posts: 45
Rep Power: 17
dkingsley is on a distinguished road
Thanks, I am leaving on vacation in less than 24 hours and setFields failed to set gamma properly on a free surface problem I want to run while I was gone.

The information in this discussion topic and wiki entry was exactly what I needed.

dennis
dkingsley is offline   Reply With Quote

Old   August 23, 2008, 05:49
Default Hallo Bernhard. I was wound
  #49
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hallo Bernhard.

I was woundering why your tool is always setting all boundary-condition to zeroGradient?

I stumbled over it, while initializing a gamma-field (for the usage with interFoam).
I had an existing gamma-file with given BC's and funkySetFields had overwritten all of them.

If there is a possibility to read some existing BC's and to put them into the "new" field, it would be a great impovement of the tool!

Greetings. S.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   August 23, 2008, 11:14
Default Hi Sebastian Look at the ke
  #50
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Sebastian

Look at the keepPatches option. It does exactly what you are inquiring about.

See:
http://openfoamwiki.net/index.php/Co...funkySetFields

- Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   August 23, 2008, 12:21
Default Well, I'm sorry. Thats obviou
  #51
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Well, I'm sorry.
Thats obvious. Why didn't I see it beforehand?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 12, 2009, 08:56
Default Hello Guys. It's me again.
  #52
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hello Guys.

It's me again.
Is it possible to access the bessel functions j0 and j1 from inside funkySetFields?

Greetings.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 12, 2009, 09:17
Default Currently: no What do you n
  #53
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Currently: no

What do you need THAT for?

Shouldn't be to hard to implement as it seems to be implemented as a function for fields: in the .yy and the .ll file duplicate everything that has a "sin" (for example) in it and replace sin with j0. Then recompile and it should be there

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   March 12, 2009, 09:22
Default I think I'm not well enough in
  #54
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
I think I'm not well enough into this.
What .yy and .ll files?

I need the Bessel functions to set up an initial 'hat shape' like Fig. 2 in http://test.interface.free.fr/Case04.pdf
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 12, 2009, 13:11
Default There are two files in the FSF
  #55
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
There are two files in the FSF-sources with those extensions. You don't have to understand what you're doing there. Just trust you instincts ;) (some of the stuff you have to duplicate goes over more than one line)

I don't have time to insert that stuff before next week. So if you need it quickly you'll have to do it yourself

Bernhard
__________________
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
gschaider is offline   Reply With Quote

Old   March 16, 2009, 07:03
Default
  #56
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
I think due to the fact, that you are exactly knowing what to do I would prefer, that you make the changes - no matter when.
Meanwhile I will take a look at the code and try not to mess with it.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 16, 2009, 07:08
Default
  #57
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Actually the update is already on the SVN. I also added the other functions that are specified in for scalars in the Programmer's guide. I just prefixed the Bessel-functions with "bessel" because I figured that y1 is too likely to clash with a field of the same name (so it is called besselJ1)

Bernhard

BTW: Concerning the title of this thread: I only fixed it for the 1.5-version
gschaider is offline   Reply With Quote

Old   March 16, 2009, 07:48
Default
  #58
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Great! I will try it the next days! Thank you.

Meanwhile I'm stuck on another problem concerning funkySetFields.
Working with the Rayleigh-Taylor-Instabilty I had to initialize a sinus-like interface.

Running funkySetFields with a condition like "pos().y <= 0.05*cos(2*pi*pos().x) + 2" does not include cells which should be partially filled and the interface looks more like some steps.

Unfortunately the simulations is not running as planned with the initialization from funkySetFields.

I had to write an MATLAB script which is also filling partially filled cells, to get a "smooth" sinus-function, which is far too much effort for such an initialization (imho).

Have a look at the attached images to make this more clear.

I have read this thread and found some similar problems with interfaces, but I'm not quite sure how to transfer this to my problem.
Attached Images
File Type: jpg gamma_init.jpg (9.6 KB, 36 views)
File Type: jpg gamma_init_fsf.jpg (9.7 KB, 37 views)
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   March 16, 2009, 08:09
Default
  #59
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi!

Partial filling of the cells is easy if the mesh is equally spaced with a spacing dy in y-direction (please replace dy with the actual spacing and fun with the function you're using "0.05*cos(2*pi*pos().x) + 2")

"(mag(pos().y-fun)<dy/2) ? (fun-pos().y+dy/2) : ( pos().y < fun ? 1 : 0)"

Maybe a sign or two is wrong with that expression, I didn't test it. But the concept should be clear

Bernhard
gschaider is offline   Reply With Quote

Old   March 17, 2009, 15:47
Default
  #60
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Well, Sorry to ask this, but I don't know what xxx ? xxy : xxz means?
I read this is a conditional operator, but I have no idea what that is, and how it should look like in C++ ...
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam gschaider OpenFOAM Community Contributions 169 August 10, 2023 10:01
[swak4Foam] how to use funkySetFields function in muliregion case bryant_k OpenFOAM Community Contributions 15 October 15, 2021 03:50
[swak4Foam] funkySetFields and funkySetBoundaryFields zxj160 OpenFOAM Community Contributions 19 February 14, 2018 20:07
[swak4Foam] funkySetFields: problem with processor boundary nmikhailov OpenFOAM Community Contributions 4 May 26, 2015 10:48
[swak4Foam] numerical beach with funkySetFields?! maxonline OpenFOAM Community Contributions 6 June 17, 2011 05:59


All times are GMT -4. The time now is 01:40.