|
[Sponsors] |
Unsteady Inlet Velocity UDF in Parallel Batch Mode |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Tyler V.
Join Date: May 2017
Posts: 2
Rep Power: 0 ![]() |
I am attempting to run an unsteady computation using interpreted UDF in parallel batch mode. I have the following simple UDF, which works fine when interpreted in the ansys GUI:
#include "udf.h" DEFINE_PROFILE(unsteady_velocity, thread, position) { face_t f; real t = CURRENT_TIME; begin_f_loop(f, thread) { F_PROFILE(f, thread, position) = (0.33-0.033) + 0.033*cos(3.14159265359*2.*10.*t); } end_f_loop(f, thread) } It is a 2D computation so I use the following to call my journal file: fluent 2ddp -t$nprocs -pinfiniband -cnf=$PBS_NODEFILE -g -i < ../run.input.transient.txt And my journal file is: define/user-defined/interpreted-functions "udf_unsteadyXinlet.c" "gcc" 10000 no file/read-case ../Input/transientInlet_0001dt_033mps.cas file/read-data ../Input/transientInlet_0001dt_033mps.dat solve/dual-time-iterate 1000 exit yes I receive the following error output: Cleanup script file is /home/vtyler/Output/cleanup-fluent-nr107-2344.sh /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /scratch-local/210074.master.cluster/ccKrifUu.o: In function `unsteady_velocity': udf_unsteadyXinlet.c ![]() udf_unsteadyXinlet.c ![]() collect2: error: ld returned 1 exit status Error: "udf_unsteadyXinlet.c": line 1: syntax error. /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /scratch-local/210074.master.cluster/ccH6qbKK.o: In function `unsteady_velocity': udf_unsteadyXinlet.c ![]() udf_unsteadyXinlet.c ![]() Also in my console output, I get the following: Reading "../Input/transientInlet_0001dt_033mps.dat"... Parallel variables... Error: chip-exec: function "unsteady_velocity" not found. Despite the errors, the code runs and outputs the solution, but it is clear the velocity boundary condition is not correct. Any ideas would be appreciated! |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia, Sydney
Posts: 415
Rep Power: 14 ![]() |
Put the UDF in the FLUENT working directory («.», not «../Input/»)?
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Tyler V.
Join Date: May 2017
Posts: 2
Rep Power: 0 ![]() |
Thanks for the reply.
What is meant by the "Working Directory"? Here is my full script setting up the parallel processing: #!/bin/bash #PBS -l nodes=1 ![]() #PBS -l walltime=80:00:00 #PBS -q normal_q #PBS -A TtProbes #PBS -W group_list=newriver #PBS -N transient_CFD #PBS -m bea #PBS -M anonymous@vt.edu cd \Output module load ansys nprocs=`wc -l $PBS_NODEFILE | awk '{ print $1 }'` fluent 2ddp -t$nprocs -pinfiniband -cnf=$PBS_NODEFILE -g -i < ../run.input.transient.txt exit yes I am assuming here my working directory is \Output and this is where my UDF is located. Also, I have reason to suspect its finding the UDF where its located since it will give me an error message if I intentionally put a bad line in the udf script. Thanks again |
|
![]() |
![]() |
![]() |
![]() |
#4 | |
New Member
sajjan
Join Date: Jan 2016
Location: Nepal
Posts: 13
Rep Power: 10 ![]() |
Quote:
Hello, I am facing the exact issue? Do you remember how did you solve the problem? Thank you |
||
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
|
Prefer compilation. Since this is a Linux system, gcc is available. Just compile it. It will work.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
![]() |
![]() |
![]() |
Tags |
batch, cluster, parallel, udf, unsteady |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Having trouble adapting serial UDF to work in parallel | muyuntao | Fluent UDF and Scheme Programming | 1 | November 10, 2015 13:42 |
Pressure boundary condition for unsteady velocity inlet | DanM | OpenFOAM Running, Solving & CFD | 6 | July 5, 2015 09:21 |
Velocity inlet boundary condition for porous medium | Chander | CFX | 3 | March 11, 2012 21:18 |
UDF parallel velocity inlet profile | Armengol | FLUENT | 3 | September 30, 2009 15:08 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 09:11 |