CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

set boundary condirions by using java macro

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 1 Post By kguntur
  • 1 Post By kguntur
  • 1 Post By ggulgulia
  • 1 Post By ggulgulia

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2015, 10:07
Default set boundary condirions by using java macro
  #1
New Member
 
marwan
Join Date: Apr 2015
Location: FL/US
Posts: 13
Rep Power: 11
marwan89 is on a distinguished road
hi guys. My advisor asked me to learn how to use java macro in Star CCM+.to be honest I have no clue and am running out of time. Can you guys give me some advises about that. like how to learn it and what is the best and fast way to do it.
marwan89 is offline   Reply With Quote

Old   April 8, 2015, 02:36
Default
  #2
Member
 
kris
Join Date: May 2014
Posts: 73
Rep Power: 11
kguntur is on a distinguished road
the best way to learn is to record and edit it.
start recording a java, do what you want to do normally, and then edit the java. This is the easiest way to create and learn java macros.
marwan89 likes this.
kguntur is offline   Reply With Quote

Old   April 8, 2015, 08:38
Default
  #3
New Member
 
marwan
Join Date: Apr 2015
Location: FL/US
Posts: 13
Rep Power: 11
marwan89 is on a distinguished road
Quote:
Originally Posted by kguntur View Post
the best way to learn is to record and edit it.
start recording a java, do what you want to do normally, and then edit the java. This is the easiest way to create and learn java macros.


thanks for your reply.but as i said i have no idea about that. i mean i know how to record but editing is not easy for me. what i am trying to do is using an equation to control the boundary condition in the inlet and the outle.can u give me an idea how to do it?
marwan89 is offline   Reply With Quote

Old   April 9, 2015, 02:43
Default
  #4
Member
 
kris
Join Date: May 2014
Posts: 73
Rep Power: 11
kguntur is on a distinguished road
jus a thought.... if you are trying to use an equation to control the boundary condition, then may be you can use field functions instead of a macro.

if you have to use java for some reason, use netbeans or something similar to edit your java codes... it makes life a bit easier. netbeans is a free software you can download and go through this thread for more details.
marwan89 likes this.
kguntur is offline   Reply With Quote

Old   April 9, 2015, 08:03
Default
  #5
Senior Member
 
Gajendra Gulgulia
Join Date: Apr 2013
Location: Munich
Posts: 144
Rep Power: 13
ggulgulia is on a distinguished road
hey marwan

Install notepad ++ and net beans. Firstly open any of the recorded macros in notepad ++. Notepad ++ is interactive in terms of usage and understanding various lines of codes. However you will not be able to debug the code in case of any errors in notepad++ , nor that notepad ++ will be able to detect any errors. To debug, you should have a fair idea of java syntax too.

To learn java, you should enroll in one of the courses offered by edx (www.edx.org) Here you will learn how to code in java which you will find helpful when coding for STAR CCM+ routines . One of these course has started on 6th april and another one is due to start on 28th april.

The basic fact you should keep in mind while working with STAR CCM+ java is that STAR CCM+ has its own libraries for java which will not be identified by a standard editor such as Net Beans or Eclipse. To get the java editor recognize the star ccm+ recorded macro, you should import the ccm+ libraries in the editor. You will find more info about this on the ccm+ manual.

You will pick up speed once you understand Java in general and star ccm+ java syntax in specific.

ccm+ manual has some very good examples on how to create user input panels when running java codes, which is very useful to feed in the data to ccm+ while doing pre-processing and post-processing.

Hope this was helpful
marwan89 likes this.
ggulgulia is offline   Reply With Quote

Old   April 9, 2015, 10:43
Default
  #6
New Member
 
marwan
Join Date: Apr 2015
Location: FL/US
Posts: 13
Rep Power: 11
marwan89 is on a distinguished road
thanks ggulgulia
.I really appreciate these information. I am gonna try to enroll in one of these courses u mentioned.Also,if u meant by manual the tutorials on cd-adapco website , I tried to understand them but i couldn't due to lack of info in Java in general
marwan89 is offline   Reply With Quote

Old   April 9, 2015, 10:45
Default
  #7
New Member
 
marwan
Join Date: Apr 2015
Location: FL/US
Posts: 13
Rep Power: 11
marwan89 is on a distinguished road
kguntur , thanks again. I thought the same thing in the beginning but my advisor told me to learn Java so I can use equations to control the boundary conditions. and as I said I am not that experience with these things so I am just trying to do what he asked me.
marwan89 is offline   Reply With Quote

Old   April 9, 2015, 12:53
Default
  #8
Senior Member
 
Gajendra Gulgulia
Join Date: Apr 2013
Location: Munich
Posts: 144
Rep Power: 13
ggulgulia is on a distinguished road
Hi Marwan

by the manual i meant the STAR CCM+ help manual or the documentation. I found the code for generating the command window there. You will get it if you go through the manual carefully
marwan89 likes this.
ggulgulia is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difficulty In Setting Boundary Conditions Moinul Haque CFX 4 November 25, 2014 17:30
Setting rotating frame of referece. RPFigueiredo CFX 3 October 28, 2014 04:59
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
OF 1.6 | Ubuntu 9.10 (64bit) | GLIBCXX_3.4.11 not found piprus OpenFOAM Installation 22 February 25, 2010 13:43
Set nonuniform boundary values nikwin OpenFOAM Running, Solving & CFD 1 November 30, 2008 07:12


All times are GMT -4. The time now is 07:48.