|
[Sponsors] |
December 1, 2014, 13:34 |
User Defined Field Function Syntax
|
#1 |
New Member
Dylan
Join Date: Mar 2012
Posts: 25
Rep Power: 14 |
Hi
I have created a user defined function and am unable to figure why it will not compile. What is wrong with my syntax? (($time > 16560) && ($time < 79200)) ? 0.00003*($time/3600)^5 - 0.0018*($time/3600)^4 + 0.044*($time/3600)^3 - 0.4912*($time/3600)^2 + 2.727*($time/3600) - 4.9577 : 0 Also, what is a good resource on learning the syntax for these functions? I checked the star-ccm+ documentation but it looks like only a few examples are given. I couldn't find anything else. Thanks Dylan |
|
December 1, 2014, 23:18 |
|
#2 |
Member
kris
Join Date: May 2014
Posts: 73
Rep Power: 11 |
starccm+ does not recognise "^". use pow(x,y) to represent x^y. that should work.
|
|
December 2, 2014, 03:24 |
|
#3 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40 |
Quote:
Eg, Code:
c0 + x*(c1 + x*(c2 + x*(c3 + x*(c4 + x*(c5))))) |
||
February 4, 2015, 05:03 |
|
#4 | |
New Member
sabrina bina
Join Date: Jan 2015
Location: Algeria
Posts: 10
Rep Power: 11 |
Quote:
|
||
February 25, 2021, 11:21 |
Cannot evaluate field function Centroid.
|
#5 |
New Member
Prit K
Join Date: Jul 2020
Posts: 3
Rep Power: 5 |
Hello everyone,
I am trying to create a variable density ( varying with height ) profile in a rectangular domain and the equation I'm using is: 0.2257*(pow($$Centroid[1],3))-0.4868*(pow($$Centroid[1],2))+0.06016*(pow($$Centroid[1],1))+1.301 I'm first generating a report using the expression and when I try to run the report ( after initialization ) I get an error saying: Cannot evaluate field function Centroid. Can someone please help me with this. Thank you in advance. |
|
July 22, 2021, 23:39 |
It seems that the pressure field cannot be changed and can only be set as a function
|
#6 |
New Member
Alisdair
Join Date: Jun 2021
Posts: 1
Rep Power: 0 |
Does anyone know how to change the pressure field to field function definition in starccm +? I define a static pressure, but I find that the system always reports an error: "unable to compute field function 'name' on 'region'. Please check that the function is defined here"It seems that the pressure field cannot be changed and can only be set as a function
|
|
August 6, 2021, 08:30 |
|
#7 | |
Member
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6 |
Quote:
Have you found the solution to your problem? Thank you! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 17:22 |
Transient User Defined Function in CFX | Niru | CFX | 0 | November 12, 2013 17:07 |
using METIS functions in fortran | dokeun | Main CFD Forum | 7 | January 29, 2013 04:06 |
OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 12:21 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |