|
[Sponsors] |
[swak4Foam] groovyBC for tractionDisplacement BC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 8, 2011, 23:49 |
groovyBC for tractionDisplacement BC
|
#1 |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Hello FOAMers,
Can anyone please tell me if it is possible to apply groovyBC to the traction in the tractionDisplacement boundary condition used in stress solvers? The BC is specified as: type tractionDisplacement; traction uniform ( 0 0 0 ); pressure uniform 0; value uniform (0 0 0); I would like to change the value of the traction as a function of time. There is a nice example 'Wobbler' in the wiki (http://openfoamwiki.net/index.php/Co...oovyBC#wobbler) but that shows how to change the displacement value, not the traction or the pressure. thanks for any input... |
|
March 10, 2011, 11:19 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
There is a library groovyStandardBCs where this is demonstrated for the totalPressure. The library is currently only present in the development version that is in the Mercurial (not in the svn). Adapting this for tractionDiscplacement shouldn't be too hard if you know some C++. Bernhard PS: I don't plan to groovyify all existing boundary condtions. Only on a "as I need them" basis. But of course if somebody groovyified a boundary condition I will gladly include it (or you can push it yourself to the hg) |
||
March 10, 2011, 20:02 |
|
#3 | |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Quote:
|
||
March 20, 2011, 18:41 |
|
#4 |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Bernhard,
I have used the groovyTotalPressureFvPatchScalarField code from the Hg debug version of swak4Foam as a guide to groovify the solidTractionDisplacement BC. Unfortunately it is not working properly as the BC isn't applied & I receive the following warning: Code:
Reading field DU --> FOAM Warning : From function groovyBCFvPatchField<Type>::groovyBCFvPatchField(const fvPatch& p,const DimensionedField<Type, volMesh>& iF,const dictionary& dict) in file groovyBCFvPatchField.C at line 123 No value defined for DU on traction therefore using 2{(0 0 0)} Code:
traction { type groovyBC; tractionExpression "(time()<20e-6) ? vector(0,1e+06,0) : vector(0,0,0)"; pressureExpression "0"; valueExpression "vector(0,0,0)"; } thx, Jim |
|
March 21, 2011, 05:46 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
March 21, 2011, 12:04 |
|
#6 | |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Quote:
I have added this to the controlDict file: libs( "libOpenFOAM.so" "libgroovyBC.so" "libgroovyStandardBCs"); is this correct? I have also changed the name of the BC in the field file to match the type-name I created. It seems that the BC is still not being recognized. thanks for your help, Jim |
||
March 21, 2011, 13:43 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I'd suggest the following steps to check whether your BC is used: 1. Check the solver output for a warning about a generic-BC (that's an indication that an unknown BC is used) 1a. Set in the system-wide controlDict the disallowGeneric*-switches to 1 2. Add syntax errors to the expressions. If the simulation fails then your BC is used 3. Add an Info << traction() after the expression-evaluation in the updateCoeffs of your BC 4. Make sure that the updateCoeffs of the superclass is called in the end |
||
June 11, 2011, 22:57 |
|
#8 |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Hi Bernhard,
I see you will be presenting at OF6.. I will be there and hope to meet you. best regards James |
|
July 21, 2011, 17:20 |
update libraries
|
#9 |
New Member
Thomas Walsh
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
Hi,
I am also trying to accomplish this with groovyTractionDisplacement. I have attached my .C and .H files. I used the groovyFlowRateInletVelocityFvPatchVectorField for the example files. I am not quite sure what to do next however. How do I get these file referenced by one of the boundary condition libraries? I noticed that there is also a .dep file for the other groovyStandardBCs. Do I have to re-make swak4Foam in order for this file to link up properly? |
|
July 22, 2011, 15:56 |
wmake lib....
|
#10 |
New Member
Thomas Walsh
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
I have figured out how to add my new groovyBC to the standard BCs library. I simply added my file's name, "groovyTractionDisplamentFvPatchVectorField.C" , to the Libraries->groovyStandardBCs->Make->files script and ran
>> wmake libso groovyStandardBCs/ This made the dependency files, but I ran into an error with the wmake process: In file included from groovyTractionDisplacementFvPatchVectorField.C:33: groovyTractionDisplacementFvPatchVectorField.H:44: 52: error: tractionDisplacementFvPatchVectorField.H: No such file or directory Is there somewhere that I should be specifying the location of the original tractionDisplacementFvPatchVectorField.H? There is a lot of other errors reported after this one, but I have a feeling that they are caused from this one. Thanks for any help, Tom |
|
July 25, 2011, 05:51 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
July 25, 2011, 13:52 |
compiling successful
|
#12 |
New Member
Thomas Walsh
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
Bernhard,
Thanks for the reply! I've successfully compiled groovyTractionDisplacement using the following additions to the make->files & options scrips: For files: groovyTotalPressureFvPatchScalarField.C groovyFlowRateInletVelocityFvPatchVectorField.C groovyTractionDisplacementFvPatchVectorField.C LIB = $(FOAM_USER_LIBBIN)/libgroovyStandardBCs For options: ifdef FOAM_DEV FOAM_DEV_OPTION = -DFOAM_DEV endif EXE_INC =-I$(OBJECTS_DIR) \ $(FOAM_DEV_OPTION) \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I../groovyBC/lnInclude/ \ -I../swak4FoamParsers/lnInclude/ \ -I$(FOAM_SOLVERS)/stressAnalysis/solidDisplacementFoam/tractionDisplacement/ LIB_LIBS = -lfiniteVolume \ -lOpenFOAM \ -lsampling \ -L$(FOAM_USER_LIBBIN) \ -lgroovyBC \ -lswak4FoamParsers I'll now have to see if my groovified boundary condition actually works. I'm making a case which will simulate the effects that a gasket has on a cover (how much it deforms). By using this new groovified boundary condition I am planing on adjusting the pressure applied to each face depending on its current (or last iteration) deformation. I will submit my case example if it is a success. If anyone has any alternative solutions or solvers that already can accomplish this goal please let me know. The pressure vs deformation for my current case has a non-linear relation. Tom |
|
July 26, 2011, 12:19 |
Compilation Error
|
#13 |
New Member
Thomas Walsh
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
It seems that I have not successfully compile groovyTractionDisplacement or that I have an error within my code. When attempting to run a simulation with the groovyTract... BC I get the following error:
--> FOAM Warning : From function dlLibraryTable:pen(const fileName& functionLibName) in file db/dlLibraryTable/dlLibraryTable.C at line 78 could not load /home/twalsh/OpenFOAM/twalsh-1.7.0/lib/linux64GccDPOpt/libgroovyStandardBCs.so: undefined symbol: _ZN4Foam38tractionDisplacementFvPatchVectorField7a utoMapERKNS_18fvPatchFieldMapperE Create mesh for time = 0 I also noticed that I get an error message while compiling the dependent files, below shows the last two lines of text written during the wmake libso groovyStandardBCs: collect2: ld returned 1 exit status make: *** [OpenFOAM.out] Error 1 I'm not sure what this Error 1 is or where it comes from. I have attached the log file, but can't seem to see what this error references. Any assistance would be appreciated. Tom |
|
July 27, 2011, 11:45 |
|
#14 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Linking the .o-file into the library is not a good idea because if that gets loaded by a stock-solver then there are two definitions of the class and the loading will fail also. If the definition of the parent class IS in the used solver (make sure by grepping the solver-binary for the symbol that was reported missing) then something strange is going on. Bernhard |
||
August 1, 2011, 04:27 |
This is what I did...
|
#15 |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Have a look at the attachment...there is a README file, make folder, and groovyTractionDisplacement .H and .C files.
cheers, James |
|
April 8, 2014, 11:24 |
tractionDisplacement groovybc
|
#16 |
New Member
Join Date: Mar 2014
Posts: 23
Rep Power: 12 |
Hi,
Is there a groovybc for tractionDisplacement, please? |
|
April 8, 2014, 11:36 |
tractionDisplacement groovybc
|
#17 |
Member
Jim Carow
Join Date: Apr 2010
Location: Michigan, USA
Posts: 41
Rep Power: 16 |
Please have a look at the attachment in my previous post. It contains the boundary condition you are looking for.
regards, James |
|
April 9, 2014, 11:48 |
|
#18 |
New Member
Join Date: Mar 2014
Posts: 23
Rep Power: 12 |
Could you please let me know how to compile the code for OF-1.6-ext?
Regards |
|
April 9, 2014, 14:25 |
Compiling Custom Boundary
|
#19 |
New Member
Thomas Walsh
Join Date: Nov 2010
Posts: 18
Rep Power: 16 |
Hi,
Its been a while since I compiled a custom boundary condition, but if you read through this post you should be able to get it working. Looks like Jim Carow also added a text file in his attachment that tells you how to, so check that out. |
|
September 7, 2016, 15:27 |
|
#20 | |
New Member
Behzad Taghilou
Join Date: Jul 2016
Posts: 7
Rep Power: 10 |
Quote:
I want to use your attachment files "groovyTractionDisplacement". What is the valid OF version for your groovyStandardBC? My current OF version is FOAM-extended 3.2? I tried to compile it first time, but It was not compiled. Will It work with this version? Or should I compile it once again? thank you. Behzad Taghilou Last edited by Behzad Taghilou; September 8, 2016 at 03:50. |
||
Tags |
boundary condition, groovybc, traction, tractiondisplacement |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC for oscillatory flow | liybzd | OpenFOAM Community Contributions | 5 | November 12, 2018 08:53 |
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC | zanilu70 | OpenFOAM Community Contributions | 4 | December 13, 2016 07:46 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 04:30 |
[swak4Foam] groovyBC issue - k and epsilon | sagnikmazumdar | OpenFOAM Community Contributions | 24 | March 1, 2015 08:16 |
[swak4Foam] groovyBC and Eqn.setReference() | benk | OpenFOAM Community Contributions | 3 | June 2, 2011 09:49 |