|
[Sponsors] |
[swak4Foam] swak4oam: swakSourceFields - SwakSetValue: How to use these? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 5, 2013, 06:21 |
swak4oam: swakSourceFields - SwakSetValue: How to use these?
|
#1 | |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15 |
Dear Foamers,
I am using the library swak4foam for quite a while and I am really satisfied with it. So far, I used it for evaluation of expressions which the solver produces, like pressure drop, velocity and so on. Now I would like to know if it is possible to use a swak4foam function value which is defined in controlDict in the solver. I found this document http://openfoamwiki.net/images/e/e6/...oam_README.pdf where is written that Quote:
I am really interested in using an expression, not as implicit or explicit source term but as an expression during run-time which is updated in each iteration. So my questions are: 1. Is it possible to define swak4foam-functions, i.e. in the controlDict, and to use them during run-time? 2. How can I use them? Do I need to modify the solver? 3. Is there an example somewhere? I am happy if there is given an example somewhere and am able to reproduce and transfer the example to my case. Thank you very much for an answer in advance. Kind Regards Anne |
||
November 8, 2013, 17:22 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
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 |
||
December 18, 2013, 12:35 |
|
#3 |
Senior Member
Anne Gerdes
Join Date: Aug 2010
Location: Hamburg
Posts: 168
Rep Power: 15 |
Thank you very much for the answer, Bernhard.
It's been a while since I wrote the post above. Finally I had a look at the examples of Examples/BasicSourceSubclasses. I also installed a new swak-Version ( swak4Foam_2.x) using OpenFOAM-2.1.1 The installation was successful as the command Code:
ls -l $FOAM_USER_LIBBIN Code:
-rwxr-xr-x 1 682832 25. Feb 2013 libfieldFunctionObjectsCustom.so -rwxr-xr-x 1 1525483 18. Dez 18:17 libgroovyBC.so -rwxr-xr-x 1 636663 18. Dez 16:17 libgroovyStandardBCs.so -rwxr-xr-x 1 2305375 8. Aug 09:40 libmyIncompressibleLESModels.so -rwxr-xr-x 1 120288 24. Jul 10:40 libmy_octree.so -rwxr-xr-x 1 107487 6. Aug 12:07 libRBFInterpolation.so -rwxr-xr-x 1 81685 6. Aug 12:07 libShapeOptimisation.so -rwxr-xr-x 1 1854204 18. Dez 18:24 libsimpleFunctionObjects.so -rwxr-xr-x 1 1672657 18. Dez 18:26 libsimpleLagrangianFunctionObjects.so -rwxr-xr-x 1 366774 18. Dez 18:27 libsimpleSearchableSurfaces.so -rwxr-xr-x 1 451306 18. Dez 18:28 libsimpleSwakFunctionObjects.so -rwxr-xr-x 1 7493071 18. Dez 18:16 libswak4FoamParsers.so -rwxr-xr-x 1 215922 18. Dez 16:29 libswakChemistryModelFunctionPlugin.so -rwxr-xr-x 1 1777552 18. Dez 18:20 libswakFunctionObjects.so -rwxr-xr-x 1 1382461 18. Dez 16:22 libswakFvcSchemesFunctionPlugin.so -rwxr-xr-x 1 399731 18. Dez 16:28 libswakLagrangianCloudSourcesFunctionPlugin.so -rwxr-xr-x 1 204731 18. Dez 16:18 libswakLocalCalculationsFunctionPlugin.so -rwxr-xr-x 1 230445 18. Dez 16:18 libswakMeshQualityFunctionPlugin.so -rwxr-xr-x 1 197195 18. Dez 16:29 libswakRadiationModelFunctionPlugin.so -rwxr-xr-x 1 150140 18. Dez 16:19 libswakRandomFunctionPlugin.so -rwxr-xr-x 1 414849 18. Dez 16:17 libswakSourceFields.so -rwxr-xr-x 1 1042878 18. Dez 16:27 libswakSurfacesAndSetsFunctionPlugin.so -rwxr-xr-x 1 282569 18. Dez 16:22 libswakThermoTurbFunctionPlugin.so -rwxr-xr-x 1 96182 18. Dez 16:16 libswakTopoSources.so -rwxr-xr-x 1 213335 18. Dez 16:23 libswakTransportTurbFunctionPlugin.so -rwxr-xr-x 1 239976 18. Dez 16:29 libswakVelocityFunctionPlugin.so But now I get an error message when running a solver (simpleFoam) in the Example swak4Foam/Examples/BasicSourceSubclasses/pitzDailyWithSwirl. The solver does not "know" the swak-Expression vectorSwakSetValue Code:
Create time Create mesh for time = 0 Reading field p Reading field U Reading/calculating face flux field phi Selecting incompressible transport model Newtonian Selecting RAS turbulence model kEpsilon kEpsilonCoeffs { Cmu 0.09; C1 1.44; C2 1.92; sigmaEps 1.3; } Creating field source list from sourcesProperties Selecting source model type vectorSwakSetValue --> FOAM FATAL ERROR: Unknown Model type vectorSwakSetValue Valid model types are: 13 ( actuationDiskSource pressureGradientExplicitSource radialActuationDiskSource scalarExplicitSetValue scalarExplicitSource sphericalTensorExplicitSetValue sphericalTensorExplicitSource symmTensorExplicitSetValue symmTensorExplicitSource tensorExplicitSetValue tensorExplicitSource vectorExplicitSetValue vectorExplicitSource ) From function basicSource::New(const name&, const dictionary&, const fvMesh&) in file cfdTools/general/fieldSources/basicSource/basicSource/basicSource.C at line 240. FOAM exiting Thank you very much for an answer in advance. Kind Regards Anne |
|
January 5, 2014, 17:39 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
#include "swak.H"
__________________
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 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swakSourceFields feature in order to fix the temperature in a certain cellZone | samiam1000 | OpenFOAM Community Contributions | 1 | June 20, 2012 09:41 |