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

[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2014, 09:25
Default
  #161
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
Unfortunately I didn't keep the logfile, but I think it broke when compiling swak4FoamParsers which allows for three cores. The CPU I compiled this on was a Intel Xeon E5-2650L 0 @ 1.80GHz.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   March 30, 2014, 08:04
Default
  #162
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Thanks! I've reported this here: https://sourceforge.net/apps/mantisb...iew.php?id=214 - and I'll try to figure out a way to fix this, as I really do like being able to build swak4Foam with multiple cores!
wyldckat is offline   Reply With Quote

Old   December 18, 2014, 06:38
Default Monitor mass flow for individual phase through outlet
  #163
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
I am using openFoam 2.3.0 and running a case which has 4 phases with multiphaseEulerFoam. Is is possible to monitor mass flow rate for all four individual phases using swak4Foam? Could someone post a code that help me get started with this?
vasava is offline   Reply With Quote

Old   January 7, 2015, 16:23
Default
  #164
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
Quote:
Originally Posted by vasava View Post
I am using openFoam 2.3.0 and running a case which has 4 phases with multiphaseEulerFoam. Is is possible to monitor mass flow rate for all four individual phases using swak4Foam? Could someone post a code that help me get started with this?
Yes it is possible.

Have you already had a look at one of the available presentations about swak?

The only tricky part would be that the new solvers have names for the phases like alpha.air and the dot bothers the parser. You'll have to add an aliases dictionary like
Code:
aliases {
  alphaAir alpha.air;
}
and then you can use a swakExpression like "phi()*alphaAir"
Luttappy likes this.
__________________
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   January 13, 2015, 02:52
Default
  #165
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 22
vasava will become famous soon enough
Thanks for the reply. I will look if I have that presentation if not I will ask for it.
vasava is offline   Reply With Quote

Old   July 5, 2019, 17:34
Default Can someone be more specific when defining the variables and expression?
  #166
Member
 
Chris Harding
Join Date: Dec 2016
Posts: 76
Rep Power: 9
HappyS5 is on a distinguished road
Quote:
Code:
inlet
{
type groovyBC;
variables "rpm=8000.0;Un=55.8;c=sum(pos()*mag(Sf()))/sum(mag(Sf()));n=sum(normal())/mag(sum(normal()));p=pos()-c;r=mag(p)+1.0e-10;R=max(r);xt=vector(n.y,-n.x,0);xT=xt/mag(xt);yt=vector(-n.x*n.z,-n.y*n.z,n.x*n.x+n.y*n.y);yT=yt/mag(yt);";
valueExpression "-Un*normal() + (rpm*pi/30)*((p & yT)*xT - (p & xT)*yT)";

c is the centre of the patch, n is the averaged patch normal.
}

Quote:
Originally Posted by gschaider View Post
The usage example of the swirl was not added by my to the page: http://openfoamwiki.net/index.php?ti...730&oldid=9729

If I interpret Niklas' equations correctly he assumes that the swirl-axis is the Z-axis (and in your case it is Y if I understand you correctly). Use your mathematical common sense to reformulate it (& is the inner product of vectors. I think it could be shorter by using ^ for the cross-product)
Forgive me but I am learning, and it has been many years since I graduated.

Can someone specifically describe each variable and expression in the above swirl code by Niklas? I would like to use the code, but I try to know why mathematical concepts exist. I thank you in advance.
HappyS5 is offline   Reply With Quote

Old   April 21, 2020, 05:50
Default funkySetFields
  #167
New Member
 
Muyiwa
Join Date: Feb 2020
Posts: 12
Rep Power: 6
Muyiwa is on a distinguished road
Hello Foamers

Please show me how to use funkySetFields to create an undulating initial field for alpha.water in the damBreak tutorial. I want to use undulating surface instead of the boxToCell used in the setFields of the tutorial.
Muyiwa is offline   Reply With Quote

Old   August 10, 2023, 03:25
Default
  #168
New Member
 
Yang Xueliang
Join Date: Nov 2021
Posts: 24
Rep Power: 4
Youngxl is on a distinguished road
Hi Bernhard,
I just finished watching your video on swak4foam and pyfoam in the of workshop journal this morning, and I benefited a lot. But I noticed that you mentioned in the video that foam-extend doesn't have fvoption now. Is this true? I'm thinking about using fe-4.1 to do a problem, and I just want to use fvoption. If I can't use it, that's a pity.
With regards,
Young
Youngxl is offline   Reply With Quote

Old   August 10, 2023, 07:34
Default
  #169
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
Quote:
Originally Posted by Youngxl View Post
Hi Bernhard,
I just finished watching your video on swak4foam and pyfoam in the of workshop journal this morning, and I benefited a lot. But I noticed that you mentioned in the video that foam-extend doesn't have fvoption now. Is this true? I'm thinking about using fe-4.1 to do a problem, and I just want to use fvoption. If I can't use it, that's a pity.
With regards,
Young
Forgot I mentioned that


Yes. AFAIK there are no fvOptions in foam-extend. Reason is (as far as I understand) that the developers of that fork think it is not a good idea to allow ThirdParty-code to mess around with the matrix (in that case a proper solver should be written). But not my project. So you better ask Hrvoje Jasak
__________________
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   August 10, 2023, 09:01
Default
  #170
New Member
 
Yang Xueliang
Join Date: Nov 2021
Posts: 24
Rep Power: 4
Youngxl is on a distinguished road
Quote:
Originally Posted by gschaider View Post
Forgot I mentioned that


Yes. AFAIK there are no fvOptions in foam-extend. Reason is (as far as I understand) that the developers of that fork think it is not a good idea to allow ThirdParty-code to mess around with the matrix (in that case a proper solver should be written). But not my project. So you better ask Hrvoje Jasak
Okay, thanks for your suggestion!
Youngxl 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



All times are GMT -4. The time now is 10:23.