|
[Sponsors] |
May 15, 2017, 08:59 |
If statement error
|
#1 |
Member
sebastian bergman
Join Date: Mar 2017
Location: seattle
Posts: 52
Rep Power: 9 |
#include "udf.h"
DEFINE_EXECUTE_AT_END(temp_gradient) { Domain *d; Thread *t; cell_t c; real r; d = Get_Domain(1); thread_loop_c(t,d) { begin_c_loop(c,t) { if ( C_T(c,t) = 600) { C_UDMI(c,t,0)=100; C_UDMI(c,t,2)=5000; C_UDMI(c,t,3)=10000; } else { C_UDMI(c,t,0)=0; C_UDMI(c,t,2)=0; C_UDMI(c,t,3)=0; } } end_c_loop(c,t) } } this code is giving following error while compiling line 45: invalid expression type for if: double. I can not figure out what the problem is. can anybody help. |
|
May 15, 2017, 09:18 |
|
#2 |
Member
sebastian bergman
Join Date: Mar 2017
Location: seattle
Posts: 52
Rep Power: 9 |
the mistake has been sorted out. thank you everyone who took the pains to look through the question.
|
|
May 15, 2017, 12:22 |
|
#3 |
New Member
Swapnil Chavanda
Join Date: Jan 2017
Location: Pune
Posts: 19
Rep Power: 9 |
Suggestions
1. Delete real r 2.shift down end_c_loop one by row (i.e. after end_c_loop there will be only one curly parentheses) Sent from my Moto G (4) using CFD Online Forum mobile app |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DPM udf error | haghshenasfard | FLUENT | 0 | April 13, 2016 07:35 |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |
Compiling problems with hello worldC | fw407 | OpenFOAM Installation | 21 | January 6, 2008 18:38 |