|
[Sponsors] |
March 26, 2018, 17:40 |
Accessing g (gravity)
|
#1 |
Member
Declan
Join Date: Oct 2016
Location: Ireland
Posts: 40
Rep Power: 9 |
Dear Foamers
I am a beginner OF programmer trying to compile a simple modification to the driftFluxFoam velocity correction function Udm that looks like: where f(x) is a combination of variables and g is gravitational acceleration. My issue is getting the function to read g, which is a file in the transportProperties dictionary. When compiling I get an error messages like ‘g was not declared in this scope’. I have tried many things like: 1. including the “readGravitationalAcceleration.H” file within some of the related files 2. adding a dimensionedVector term called ‘grav’ to the transportProperties dictionary itself then calling it along with the other velocity function variables 3. trying to define const uniformDimensionedVectorField in the modified file 4. looking at other default solvers and their functions for similar calculations I feel like this is something straightforward and it's just lack of experience getting in the way but I've been at it for days now and any help would be much appreciated!! Many Thanks! Declan |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convergence problem when use gravity | aroma | STAR-CCM+ | 1 | April 10, 2013 10:18 |
Ok to increase gravity gradually from 0 to 9.82? | Admo | FLUENT | 3 | February 23, 2012 10:43 |
UDF fails to model 9.81m/s^2 gravity | jpo | Fluent UDF and Scheme Programming | 2 | January 24, 2012 18:15 |
how to consider gravity in CFX | shrimp | CFX | 4 | September 8, 2008 20:41 |
On gravity modelling... | Drona | CFX | 7 | November 22, 2001 10:28 |