|
[Sponsors] |
November 9, 2009, 06:19 |
|
#61 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
||
November 9, 2009, 06:22 |
|
#62 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
November 16, 2009, 15:39 |
|
#63 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hi Bernhard,
I was playing with groovyBC today and it appears that "epsilon" was not recognized whereas "k" was - am I missing something ? Thanks ! PO |
|
November 17, 2009, 06:57 |
|
#64 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I have a suspicion (the field has not yet been created in memory) but I need more information Bernhard |
||
November 17, 2009, 08:30 |
|
#65 |
Senior Member
Pierre-Olivier Dallaire
Join Date: Mar 2009
Location: Montreal, Quebec, Canada
Posts: 192
Rep Power: 17 |
Hi,
I'm defining a BC condition in field nut at time=0 using k and epsilon, solver is pisoFoam but you are right, if I'm using a turbulence model that is not loading epsilon, well I cannot use it - thanks for your comments. I forgot about that yesterday when using kOmegaSST. Regards, PO |
|
December 2, 2009, 09:08 |
Got the WaveTank Demo worked on OF1.6
|
#66 |
New Member
Join Date: Nov 2009
Posts: 12
Rep Power: 17 |
Hello,
after some variations with gamma-alpha1 and some others I just got the demo WaveTank working. But the waves seem to stay in the tank (reflection on the outlet) and not to go "through" the wall. Any ideas how to fix (change) it? |
|
December 2, 2009, 15:23 |
|
#67 |
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17 |
Hello Mr Gschaider,
I am having a small trouble with valueExpression. I need to specify flap wave maker expression for velocity="(y*(A/h)*w*cos(w*t))" of moving wall. Baased on discussion earlier I understood that it has to be specified as follows: valueExpression "toPoint((time()>0.0) ? pos().y*(A/h)*w*cos(w*time()) : 0)";--in the pointMotionUx dictionary. valueExpression "((time()>0.0) ? toFace(pointMotionUx): 0 )"; ---in the cellMotionUx dictionary. valueExpression "(time()>0.0) ? vector(toFace(pointMotionUx),0,0) : vector(0,0,0)";--in the U dictionary. My simulation runs fine with no errors,but my results of free surface elevation is not quite satisfactory. I may be wrong but I am thinking that it is because I am not specifying the expression correctly and so I tried to change my expression using pts().y as follows valueExpression "(time()>0.0) ? pts().y*toPoint((A/h)*w*cos(w*time())) : 0"; valueExpression "((time()>0.0) ? toFace(pointMotionUx): 0 )"; valueExpression "(time()>0.0) ? vector(toFace(pointMotionUx),0,0) : vector(0,0,0)"; but I get an error as follows Parser Error at "1.15-17" :"syntax error, unexpected TOKEN_points" "(time()>0.0) ? pts().y*toPoint((A/h)*w*cos(w*time())) : 0" " ^^^ " Can you please suggest,how do I specify the flap wave maker velocity for the moving wall correctly. Regards, Gautami. |
|
December 2, 2009, 17:29 |
|
#68 |
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17 |
Hello Mr Gschaider,
For the piston wave maker I need to specify the velocity=A*w*cos(w*t) for the moving wall I have been doing this as follows: valueExpression ""toPoint((time()>0.0) ? A*w*cos(w*time()) : 0)";--in the pointMotionUx dictionary. valueExpression "((time()>0.0) ? toFace(pointMotionUx): 0 )"; ---in the cellMotionUx dictionary. valueExpression "(time()>0.0) ? vector(toFace(pointMotionUx),0,0) : vector(0,0,0)";--in the U dictionary. My simulations run fine witout errors. But for different values of A and w I dont not get the correct free surface elevation.For example the free surface elevation graph does not start from zero,instead it starts either above or below zero. Can you please let me know if the problem is with the way I am specifying the expression or it is something else. Regards, Gautami. |
|
December 3, 2009, 05:28 |
|
#69 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
December 3, 2009, 05:33 |
|
#70 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
December 9, 2009, 14:08 |
|
#71 |
Member
Wolfgang W.
Join Date: Nov 2009
Location: Switzerland
Posts: 57
Rep Power: 17 |
Hello everybody,
I have started using groovyBC recently and I must say that it's really awesome! Thanks a lot for this contribution :-) Anyway ... here comes my issue. I'm using dev-1.5 and groovyBC is getting along fine. But this week I was using groovyBC in connection with the icoFsiFoam solver, which is capable of doing fluid-structure-interaction as well as the respective mesh motion. GroovyBC again worked fine in p and U - but what I need to do is have a definded transient wall deformation (which is possible by setting BC in motionU - I already succeeded using oscillationFixedValue but for my purpose I need more flexibility). Now motionU is an object of tetPointVectorField class (not volScalarField or volVectorField as p or U) and groovyBC is refused with the following statement: Create time Create dynamic mesh for time = 0 Selecting dynamicFvMesh dynamicMotionSolverFvMesh Selecting motion solver: laplaceFaceDecomposition Unknown patchField type groovyBC for patch type patch Valid patchField types are : 15 ( symmetryPlane oscillatingFixedValue empty fixedValue mixed componentMixed processor calculated slip timeVaryingUniformFixedValue generic value global wedge zeroGradient ) file: /home/wolfgang/Foams/playFoams/bloodVesselFSIsimple_longVessel_oscillating/fluid/0/motionU::topWall from line 41 to line 44. From function PointPatchField<PatchField, Mesh, PointPatch, MatrixType, Type>::New(const PointPatch&, const DimensionedField<Type, Mesh>&, const dictionary&) in file /home/wolfgang/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/newPointPatchField.C at line 221. FOAM exiting Is there anything I can do to make groovyBC work inside motionU? It would of course be fantastic to be able to define transient wall motion in an analytical way by using groovyBC. Has anybody ever done such a thing or is this a stupid approach? I would be grateful for any advice or hint :-) Cheers, Wolfgang |
|
December 9, 2009, 17:43 |
|
#72 |
Member
Gautami Erukulla
Join Date: Mar 2009
Posts: 71
Rep Power: 17 |
Hello Mr Gschaider,
Thank you for your suggestions.Still working on it.Will let you know once I get good results. Regards, Gautami. |
|
December 11, 2009, 16:31 |
|
#73 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Gschaider,
A Good Evening to you! I am surprised that though I have been using OpenFOAM for almost three years now, I have not had the opportunity to look into such an excellent contribution such as the groovyBC :-)! I must say, it is seriously "groovy" :-)! Thanks a lot! Recently I had the need to come up with a way of coupling two patches, such that the pressure on one patch (inlet), is dependent on the pressure on an another patch (outlet1) via a simple expression like: p(inlet) = mean[p(outlet)]*m + c After trying for a couple of hours to come up with a new boundary condition for OpenFOAM without success, I solved the problem by modifying my toplevel solver (in this case, simpleFoam) to read in a Master patch and Slave patch from a new dictionary file (called coupledPatchDict), along with a factor (m) and offset (c). Continuing with my example, .... Master patch = outlet1 .... Slave patch = inlet .... m = 0.0 .... c = <a constant> .... Slave patch = (Master patch)*m + c This method worked very well, but I don't like that fact that the implementation is so specific..... starting from modification of a top-level solver, to the fact that as of now I can only specify one master patch and one slave patch, and also, that the field which is modified (in this case "p") is hard-coded into the modified solver. Do you think it would be possible to extend the groovyBC boundary condition in order to support such coupled systems? An additional entry like the timelines entry... for example "coupledPatches" or just "patches" could be used to specify something like: patches ( .... { .......... name <variable name to use within groovyBC expression>; .......... patch <patch1>; .......... field <field on patch to use>; .......... component <component of field to use>; ---> in case of vectorField or "magnitude"? .... } ); What do you say? Have a nice day! Philippose |
|
December 14, 2009, 08:13 |
|
#74 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
December 14, 2009, 08:28 |
|
#75 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
December 15, 2009, 07:44 |
|
#76 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Bernhard,
A Good Afternoon to you! Cool :-)! So I am not the first to want something like this. I had looked around on the forum, but found no similar requirements from anyone else, and hence resorted to modifying the solver myself. It is true that we can only expect to extract a single value from the Master patch. In my case, I took the area weighted average value of the pressure. I dont think it would be required to implement a generic mapping method. I guess providing a couple of options like "min", "max", "mean", etc as part of the specification dictionary would suffice for most normal cases. adding on a dictionary key like "extract" should be sufficient. Is there any way I can be of any help for implementing something like this into groovyBC? I briefly looked through the source files, but the parser part was literally "Greek and latin" for me :-)! Am not (yet) familiar with bison or yylexer, etc... Have a nice day, and thank you for the response :-)! Philippose |
|
December 15, 2009, 12:07 |
|
#77 | ||
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Quote:
There are two ways you can help: - provide me with a simple (preferably tutorial-based) test-case - have patience Bernhard |
|||
February 16, 2010, 14:10 |
|
#78 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Bernhard,
A Very Good Evening to you :-)! I just happened to be looking into the OpenFOAM-dev SVN repository, and found the changes you have made to GroovyBC :-)! All I can say is.... wow :-)! You implemented the ability to couple patches via expressions!! Thank you very much! On the other hand, I am feeling extremely sheepish now for not having sent you a test-case. I have no excuses for it except for "laziness", and I am very sorry... Does this version of GroovyBC also work on OpenFOAM-1.5-dev? I have not yet started using OpenFOAM-1.6, and I prefer to stick to the "-dev" versions. Shall try to compile the latest version of GroovyBC on OpenFOAM-1.5-dev, and let you know how it works out on the case I had. I hope this time atleast I can post some pictures and a case too.... Once again.... thank you! Have a nice evening ahead! Philippose |
|
February 17, 2010, 14:19 |
|
#79 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
No problem with the test-case. There is always a chance to make it up . I think back-porting the changes to 1.5(-dev) should be rather easy (if I remember it correctly the majority of the effort to port groovy from 1.5 to 1.6 was modifying the demo-cases so that they work again). Should you succeed, you can check them into the SVN (that would be nice). Bernhard |
||
February 17, 2010, 15:15 |
|
#80 |
Senior Member
Philippose Rajan
Join Date: Mar 2009
Location: Germany
Posts: 552
Rep Power: 25 |
Hello Bernhard,
Yet another Good Evening to you, though it could start getting a little warmer now :-)!! My eyes are getting bored of seeing black, white and grey... !! I thought I would give you a first status update regarding the coupling facility you added to groovyBC recently: 1. I checked out the OF-1.6 version of groovyBC from SVN today, and directly, without making any changes, compiled it on OpenFOAM-1.5-dev.... Result: It worked without a hitch :-) So it looks like you could simply copy all the changes you made on the 1.6-branch of groovyBC to the 1.5-branch 2. Using help from the demo case which you set up to showcase this new feature, I modified my case for which I had used my modified simpleFoam solver earlier.... to use groovyBC together with the standard simpleFoam solver.... Result: It worked very well :-)! The fields converged to the same values I had seen earlier, and the groovyBC feature worked exactly as I hoped :-)! 3. An additional test-case for the repository.... I shall see if I can actually give out a modified version of the case I ran for inclusion into the groovyBC suite. 4. For others who might want to try out this cool feature.... here are my "0/p", "0/U" and "system/controlDict" files..... *** "0/p" file --> Code:
dimensions [0 2 -2 0 0 0 0]; internalField uniform 2352.9411; // 20 bar boundaryField { fixedWalls { type zeroGradient; } inlet { type groovyBC; valueExpression "pLS+(9.5*100000.0/850.0)"; variables "pLS@outletLS=sum(p*mag(Sf()))/sum(mag(Sf()));"; // Calculates the average value of p at the LS patch value uniform 2352.9411; } outlet { type fixedValue; value $internalField; } outletLS { type zeroGradient; } } Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { fixedWalls { type fixedValue; value uniform (0 0 0); } inlet { type pressureInletVelocity; value uniform (0 0 0); } outlet { type zeroGradient; } outletLS { type fixedValue; value uniform (0 0.67905 0); } } Code:
application simpleFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 2000; deltaT 1; writeControl timeStep; writeInterval 10; purgeWrite 2; writeFormat ascii; writePrecision 6; writeCompression compressed; timeFormat general; timePrecision 6; graphFormat gnuplot; runTimeModifiable yes; libs ("libgroovyBC.so"); functions ( massFlow { type patchMassFlow; functionObjectLibs ("libsimpleFunctionObjects.so"); verbose true; patches ( inlet outlet outletLS ); factor 60000.0; } ); Have a great day ahead! Philippose |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ship resistance shows wiggles when using Overset mesh and dynamic mesh in Fluent | Qingsong | FLUENT | 2 | March 21, 2022 16:08 |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[ICEM] Dynamic mesh setup with ICEM | David121284 | ANSYS Meshing & Geometry | 0 | April 11, 2014 05:19 |
Dynamic Mesh "Shadow Wall" | thezack | FLUENT | 0 | June 4, 2013 23:09 |
dynamic mesh for drop interface | IndrajitW | FLUENT | 0 | March 30, 2013 09:03 |