CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swak4Foam] How to run the case in swak4Foam (https://www.cfd-online.com/Forums/openfoam-community-contributions/160380-how-run-case-swak4foam.html)

ce73stargazer October 7, 2015 01:08

How to run the case in swak4Foam
 
Hi there.
I am new to swak4Foam. With some attempts, I believe that I've succeed in installing swak4Foam as funkySetFields works for me and showing swakVersion 0.3.2. I am using OpenFoam 2.4.0 btw.

What i really confused now is how to test the cases using swak4Foam. There are lots stuff inside the Examples folder and i dont know whats/are the solver(s) for them. (For instance, in OpenFoam, if i tried to solve a case, i will do setField, then use the solver such as interFoam etc and view the results in paraview). I am not sure if its the same case for swak4Foam, i've looked up in OpenFoam wiki, but dont have any success till now. Anyone can give me some suggestions?

Cheers

HenningW October 9, 2015 03:37

Usually there is some *.sh or AllRun file. If not, you usually run blockMesh, snappyHexMesh (of found in /system) and then your solver (have a look at /system/controlDict and look for the value under "application").

Since my answer sounds like very basic OF stuff, did I get your question right? Do you have a specific tutorial case that you are unsure about?

rapierrz October 10, 2015 13:00

Hi Zhifang,

You can start with swak4Foam with simple case such as parabolic velocity

profile in channels of pipes. Don't worry it's very easy ;)

ce73stargazer October 11, 2015 19:29

Quote:

Originally Posted by HenningW (Post 567261)
Usually there is some *.sh or AllRun file. If not, you usually run blockMesh, snappyHexMesh (of found in /system) and then your solver (have a look at /system/controlDict and look for the value under "application").

Since my answer sounds like very basic OF stuff, did I get your question right? Do you have a specific tutorial case that you are unsure about?

Thanks for the help, what i find is that most the cases in swak4Foam do not have any AllRun file. I played around with it a bit latterly. I found the solver option in controlDict, but they do have some werid ones like 'oodles' for pulsedPitzDaily under grovvyBC.

Can i ask you a more specific question that is there any articles about wave generation/absorption methods applied in swak4Foam. Basically thats the main goal of me using swak4Foam, to simulate a wave propagation.

ce73stargazer October 11, 2015 19:35

1 Attachment(s)
Quote:

Originally Posted by rapierrz (Post 567477)
Hi Zhifang,

You can start with swak4Foam with simple case such as parabolic velocity

profile in channels of pipes. Don't worry it's very easy ;)

Thanks for the reply. Do you mean the case of simpleBendedPipe ? The example cases swak4Foam is a bit mess for me (see the attachments) and some of them have really weird solver like 'oodles', i dont know if that's a bug or not.

HenningW October 19, 2015 03:31

Quote:

Originally Posted by ce73stargazer (Post 567616)
Thanks for the help, what i find is that most the cases in swak4Foam do not have any AllRun file. I played around with it a bit latterly. I found the solver option in controlDict, but they do have some werid ones like 'oodles' for pulsedPitzDaily under grovvyBC.

Sorry, I never did wave propagation or oddles. So I can't really help you there. But a quick search on the forum brought me to this:

Quote:

Originally Posted by gschaider (Post 286419)
oodles is now pisoFoam

Source: http://www.cfd-online.com/Forums/ope...tml#post286419

lovelybugatti December 19, 2017 11:20

Implementing a velocity profile with groovy on OpenFoam
 
Hi everybody
I am working with OpenFoam version 4 and I want to set specific equation as inlet boundary condition for velocity.
I installed swak4foam.
then used this library in my controlDict file.

libs (
"libOpenFOAM.so"
"libgroovyBC.so"
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
);

and this command in u file in folder 0
inlet
{
type groovyBC;
value uniform (0.1 0 0);
variables "yp=mag(pos().y-4.);vel=0.55+0.5*tanh(2.5*(1-2*yp));";
valueExperssion "vector(vel,0,0)";
}
Then I checked the domain after some simulation, it seems that it impose 0 for all velocity.
Can you please help about that and tell me what I did wrong?
I checked the syntax with several reference and it seems correct and I do not know what else should I check.
Best regards

HenningW December 19, 2017 11:38

Hi,

the first thing that catches my eyes is:

valueExperssion

Pretty sure there is a typo - if you did a copy/paste you might want to check that out.

Otherwise what usually helps me is to crack down the problem to something very simple and gradually add the mathematical expressions. You could also try to put all in the last line without the variables. At least in an old version of OF it sometimes messed up my calculations.

Let me know whawt worked for you

Henning


All times are GMT -4. The time now is 17:22.