Simulation and Modeling

Simulation and Modeling

  • Simon Castro added an answer:
    Does anyone know how I can plot 3-dinemsional matrix with fourth attributes in MATLAB?

    Dear all
    I tried to visualize three-dimensional patterns in MATLAB using slice command and the plot attached in Figure 1_03012015.png which is not quite what I want.
    close all;
    obj = load('shadow.mat');% importing data
    dyzw = obj.dyzw;
    slice(dyzw, [], [], 1:size(dyzw,3));
    shading interp
    Instead, I want to get similar attached figure “Figure 2_03012015.jpg” but in color. This means I want to get rid of whole extent i.e. blue plate. Could you please help me in this regard?
    I appreciate your advice.
    Thanks in advance.

    Simon Castro · The University of Manchester

    Hi Mahesh,

    If you're talking about setting the alphamap parameters I'm not sure about this, as I haven't done this previously. Best to check the documentation (the link below has a worked example included for a surface plot - not the same but you should be in principle be able to do this for slice).

    If you wanted to set some pixels to NaN I would do the following. I'm not sure what format your dyzw array is in, but you can set anything above or below a certain threshold using the following lines of code:

    dyzw ( dyzw < thresholdLow) = NaN;

    dyzw ( dyzw > thresholdHigh) = NaN;

    This way, anything below thresholdLow and above thresholdHigh will be set to NaN and should appear as transparent. You will have to figure out appropriate values of these thresholds based on your data.

    Hope this helps


  • Akhilesh Akhade added an answer:
    How can I simulate an intrusion detection in an OPNET modeler?

    I need some information about how I can do an IDS algorithm in an opnet modeler simulation program. Can anyone help me?

    For Example: create a network contain an attacker, and victime and implementing our IDS approach

    Akhilesh Akhade · BITS Pilani, K K Birla Goa

    The link to source code is given below.

  • Christian Roth added an answer:
    What is the best TeX editor for LaTeX?
    Give your opinion especially on your experience whether good or bad on TeX editors like LEd, TeXMaker, TeXStudio, Notepad++, WinEdt (Paid), ....

    Some quick ref.
    Christian Roth · VU University Amsterdam

    Also worked with and it was pretty good. I had trouble installing a package but that might have been an user error. I can recommended this online service, if you want Latex in a feasible way and don't rely on offline access.

  • Edin Cerjaković added an answer:
    How to model inventory replenishment policies and production strategies of a company?
    I want to model the inventory replenishment policies and strategies in the production of a company by using a method to simulate, for example using a programming language to facilitate the simulation on a computer.
    Edin Cerjaković · University of Tuzla

    Hello Zahrial,
    good simulation tool for analyzing processes in to company (for the simulation process time from a few minutes to several years) is discrete event simulation.

    Your model can also be generated with discrete event simulation.

    I use Tecnomatix Plant Simulation (earlier: SIMPLE++ or eM-Plant), it is a very good tool with integrated programming language SimTalk, so that the most of non-standard problems also can be described.

  • Shimelis Setegn asked a question:
    Does a physically based nonpoint source model simulate mercury and nuclear waste?

    There are several hydrological and hydrodynamic models. I usually model nutrients transport using watershed models. Does a two-dimensional physically based nonpoint source model simulate mercury and nuclear waste?

  • Andrei Buin added an answer:
    How can I perform a simulation of a reaction using Gaussian?

    Dear All scholars,

    I want to simulate a 4 steps reaction over carbohydrates and anticancer drugs Gaussian, first of all, does the Gaussian have this ability to simulate this reaction and if so, i would appreciate anyone if he/she could give me some advises to do it?

    Andrei Buin · University of Toronto

    I'm doing something similar using CP2K. Basically one should look at enhanced sampling methods such as Replica Exchange Molecular dynamics. I have an implemenation of REMD on top of CP2K if needed i can send you. It is not going to work with Car- Parinello MD however should be fine with Born-Openhimer MD.

  • Jason M Swails added an answer:
    Suitability of amber force fields for high temperature MD simulations?

    Amber force fields generally used for low temperature simulation and results from amber force fields matches with the experimental data. So can we use amber force fields for high temperature simulations.  

    Jason M Swails · Rutgers, The State University of New Jersey

    I'll also add that the force fields were parametrized for room-temperature (or biological temperature) simulations.  I would not trust the validity of the force fields at much higher temperatures.

    With REMD, you actually don't have to care about this, because the high temperature replicas simply serve as a sampling reservoir that gets injected back into the thermally "relevant" simulations. This is done via a rigorous Monte Carlo criteria that ensures the overall ensemble will sample from the correct distribution, regardless of the "experimental correctness" of the higher temperature replicas.

    The most obvious place you can see the potential breakdown of the Amber force fields (and other, similar force fields by comparison), is the truncation of the valence potential energy term Taylor series (bonds and angles) to a simple quadratic function.  At low temperatures, bonds and angles may vibrate in a way that is mostly harmonic, so this is OK.  Go to higher temperatures, and anharmonicity becomes more important and so the functional form of the force field itself may begin to break down.

    This isn't to say that the force fields are for sure wrong at higher temperatures, but you would have to convince people they are right first.

  • Elena Gorokhova added an answer:
    Is anyone familiar with Iterations in STELLA models - how can I run them automatically?

    I need a suggestion from those who are familiar with STELLA or iThink (isee) modeling. How to run a model multiple times (>1000) and collect the output in a usable format?

    Elena Gorokhova · Stockholm University

    Hi René,

    Thank you, problem solved! I didn't realize that this is done via S-run. Thank you again.


  • Akhlaqur Rahman added an answer:
    Where can I get some resources for different types of Computation mathematical models and task graphs?

    For my research I need some technical knowledge about different types of a Computation mathematical models and task graphs. 

    Can someone suggest paper links or book names that may provide these info?

    Akhlaqur Rahman · Swinburne University of Technology

    Thank you for that. I think this will be great help. Appriciate this.



  • Shridhar Velhal added an answer:
    Is there any mathematical model possible for a suspension system which has 6-degree freedom?

    please suggest or share any idea regarding this.

    Shridhar Velhal · National Institute of Technology Calicut

    Mathematical model in given in following paper.  It may help you

  • Ehsan Mohseni added an answer:
    Has anybody used the MOVING MESH or DEFORMED MESH for a 3D model in COMSOL?

    Several times I tried to use these options to generate a movement for an eddy current simple circular coil (solenoid) in comsol and every time I failed to proceed.

    I was supposed to apply the moving mesh or deformed mesh to simulate the movement of coil on a fixed conductor (simple scan) in time domain (time dependent simulation) and also at same time measure the variations of coil inductance due to its movement on the conductor (a stationary frequency domain simulation), I have my models in hand, in case anyone feels like to help me on that , I will be more than happy to send my models for your comments.

    Best Regards,


    Ehsan Mohseni · École de Technologie Supérieure

    Hi Hossein,

    Thank you for the response. Being honest I don't have the version 4.3. the oldest version that I have here is 4.4 but I'll try to download the one that be compatible with you version in coming days. Thanks for your interest to help. I'll get back to you soon.



  • Closed account added an answer:
    Can any one help in the parameterization of ZN metal using MCPB?

    I want parameterise the ZN metal, which is coordinated with CCCH (three CYS and one HIS residues) residues. I just followed MCPB tutorial. While side chain modelling i got errors and unable to fix the problem. Here, i have attached my pdb file , sidechain.bcl file and sidechain.bcl log files.

    Deleted · Wasit University

    ANDDEAR RESEARCHER,I AM THE FIRST ONE TO ANSWER,HERE IS MY COMMENTS, the Protein Data Bank (PDB) contains over 18,000 structures that contain a metal ion including Na, Mg, K, Ca, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Pd, Ag, Cd, Ir, Pt, Au, and Hg. In general, carrying out classical molecular dynamics (MD) simulations of metalloproteins is a convoluted and time consuming process. Herein, we describe MCPB (Metal Center Parameter Builder), which allows one, to conveniently and rapidly incorporate metal ions using the bonded plus electrostatics model (Hoops et al., J. Am. Chem. Soc. 1991, 113, 8262-8270) into the AMBER Force Field (FF). MCPB was used to develop a Zinc FF, ZAFF, which is compatible with the existing AMBER FFs. The PDB was mined for all Zn containing structures with most being tetrahedrally bound. The most abundant primary shell ligand combinations were extracted and FFs were created. These include Zn bound to CCCC, CCCH, CCHH, CHHH, HHHH, HHHO, HHOO, HOOO, HHHD, and HHDD (O = water and the remaining are 1 letter amino acid codes). Bond and angle force constants and RESP charges were obtained from B3LYP/6-31G* calculations of model structures from the various primary shell combinations. MCPB and ZAFF can be used to create FFs for MD simulations of metalloproteins to study enzyme catalysis, drug design and metalloprotein crystal refinement.
    PMID: 20856692 [PubMed] PMCID: PMC2941202 Free PMC Article
    Share on FacebookShare on Twitter

  • Manoj K Poudel added an answer:
    Is self-citation good for showing the continuity of the research and avoiding self plagiarism? Please share your experience and thought.
    Self citation can help paper reviewers to check on the history of the author(s) and research topics.

    Any comment or opinion are welcome.

    Manoj K Poudel · Penn State Hershey Medical Center and Penn State College of Medicine

    1. Nothing is good or bad, thinking (of readers and judges) makes it so!

    2. Nothing is good or bad, intention (of the author and co-authors) makes it so!

  • Jean-Michel Bergheau added an answer:
    Which simulation tool can be used to simulate diffusion of nitrogen into the metal during nitriding?
    Jean-Michel Bergheau · École nationale d'ingénieurs de Saint-Étienne

    You can check the capabilities of the Finite Element software SYSWELD. I think you could be interested with the following papers :

    J M Bergheau, J Devaux, P Duranton, R Fortunier, M Larreur, J B Leblond, « Numerical simulation of superficial diffusion and precipitation of chemical elements, with application to some nitriding process », Surface Treatment VI, edited by C.A. Brebbia, J.T.M. de Hosson, S.I. Nishida, ISBN 1-85312-962-3, 2003, pp. 297-306.

    E. Feulvarch, J.M. Bergheau, J.B. Leblond, « An implicit finite element algorithm for the simulation of diffusion with phase changes in solids”, International Journal for Numerical Methods in Engineering, n° 78, 2009, pp. 1492-1512.

  • Paul Krot added an answer:
    Multiscale modeling of steel microstructure
    My questions for discussion are as following.

    1) There are a lot of publications on multiscale modeling of steel microstructure using standard FEM, special FEM, molecular dynamics methods (discrete elements, moving cellular automata) with quite nice images of simulations. How to varify results of simulations in grains boundary deformations and strains, grains growth and fragmentation as we will never have exactly the same pictures under microscope, moreover 2D instead of 3D. What criteria of microstructure models correctness? I think only statistical parameters of grains distribution (before and after deformation) can help in validation. Is any other opinions?

    2) There are several methods to produce ultra-fine grained (UFG) metals (ferrous and non-ferrous) with grains less than 1 micron by the severe plastic deformation (SPD) (ECAE(P), HPT, ARB, asymm. rolling-AR). Is anybody here who has a deal with steel microstructure multiscale simulation in SPD processes?
    Paul Krot · National Academy of Sciences of Ukraine, Z. I. Nekrasov Iron and Steel Institute

    Thanks, Pardis. Happy New year

  • Scott Lett added an answer:
    Does the Smith, Hucka et al method for hierarchical model composition uses many features of previous modeling methods?

    In 2003, in U.S. Patent Application 20030009099, Lett et al disclosed a component-based design pattern that facilitates hierarchical model building and model sharing.   In 2009, the Randhawa, Shaffer & Tyson article in Bioinformatics used a very similar approach.  While the authors acknowledged that some commercial applications implemented hierarchical composition of model components, they did not know of the public disclosure in application 20030009099.   I'm curious if the authors of Smith, Hucka, Hoops et al might comment on similarities and differences between the approaches?

     Randhawa R, Shaffer CA, Tyson JJ. Model aggregation: a building-block approach to creating large macromolecular regulatory networks. Bioinformatics 2009;25(24):3289-3295. doi:10.1093/bioinformatics/btp581.  

    Thank you, Tarik.  
    I am a big fan of the COMBINE effort, and proud to have collaborated with many pioneers in this field for over a decade.   It is gratifying to see so much momentum.  While I am not active in this area now, I retain an intellectual interest, and hope to keep up with what's new, and selfishly curious if  any of our contributions were of lasting value.  Wishing continued success,

  • Yuemin Hou added an answer:
    Are there methods (and tools) that can be used equally well for modeling the architecture/operations of HW, SW and CW constituents of complex systems?

    Integral and uniform modeling of hardware (both analog and digital), software (both system and application), and cyberware (knowledge structures, ontology contents, and data structures) of complex systems in the pre-embodiment and embodiment phases of development seems to be a challenge. Finding methods and tools, which cover each of the three domains, is difficult in the literature. Please advise if any trans-disciplinary method exist for architectural and operational, or possibly for a hybrid modeling, of complex systems.

    Yuemin Hou · Tsinghua University

    The key is to model behaviours.

  • Closed account added an answer:
    Using Real Time simulation in the case of off-line simulations has no problem to solve equations, could be an advantage to enrich research or no? Why?

    I have applied a new application on excitation of a generator. The simulation is carried out on Matlab environment. But the question is: regarding to the application is applied within excitation system ( it means the applied controller is local and destination factor is not a concern.) using Real Time simulation could be an advantage to enrich research or no?

    Thanks for your useful comments

  • Rick Vleugels added an answer:
    Does anyone know about a computational method to calculate if a molecule would form H-aggregates of J-aggregates?

    I have done some measurements on a small, rod-like, rigid molecule and I'm thinking the molecule switches over time from h-aggregates to j-aggregates. I was wondering if there are some computational methods to confirm this?

    Rick Vleugels · University of Leuven

    Thank you! The article looks very interesting. I'll look into it.

  • Ab Ka added an answer:
    Could it be possible implementing the fitness function of GA code in matlab to work with simulation rather than equations?

    I chose the GA for optimization by writing the program using ga code in matlab. This program is ok if I put the terms of fitness function as equations; for example:
    When I run the program the ga graphs and results is fine, and par=10.
    However, when I put these equations as a model in simulation, the ga graphs (best value) is constant (line) which is incorrect.
    My issue is that I need to import y1 from the simulation and y2 from data results to estimate par.
    Really I got stuck in this point which is how can I use ga with simulation.
    Moreover, I can share the knowledge with who is interested in.


    Ab Ka · De Montfort University

    Thanks Monica,
    The program is more better now but it is still struggling to use k1 and k2 in the Objective Fcn while these parameters (k1 and k2) in a simulation model.
    If it is implemented via equation, it is working perfectly. However, with simulation is NOT.
    I do not know if there is any one use GA in simulation. It looks stranger, but physically it can be performed.

  • Jinlong Li added an answer:
    How to make an interface between Matlab/simulink 7.9 and PSCAD X4?
    I am trying to make an interface between matlab/simulink 7.9 and PSCAD X4, but all user’s manuals for PSCAD from Manitoba describes how to make that interface with older versions of matlab and PSCAD. Does anybody made any interface between these versions and had any success in it?
    Jinlong Li · shihezi university

    My answer to the question is presient in the attachment

  • Do Toan added an answer:
    Does anyone use COMSOL Multiphysics for simulation?
    Is anyone working in this area - Electromagnetism, Heat transfer and CFD.
    Do Toan · Yuan Ze University

    Does anyone use COMSOL for the simulation of Plasma Electrolytic Oxidation?

  • Garry Riviere added an answer:
    How can I deal with staggered grid boundary conditions?

    I'm using a semi-implicit code and I don't know how to deal with boundary conditions of staggered grids at the implicit part of the code. There is some book that can help me?

    Garry Riviere · University of La Réunion

    You can find boundary conditions implementation in An introduction to computational fluid dynamics. The finite volume method. H. K. VERSTEEG and W. MALALASEKERA.

  • Adebayo Akanbi Oladapo added an answer:
    Can I modify receiver section of SAC-OCDMA by using MATLAB?

    I need a proposed work research. Kindly suggest the relevant work further.

    Adebayo Akanbi Oladapo · University of Central Lancashire

    Sorry, I have no idea; this is not in my area of expertise

  • Simon Schröder added an answer:
    Which computer language (C, Fortran, Visual basic) is faster in the CFD using FEM? Do any of them work with VBE?
    I'm working on a CFD project using FEM, the time elapsed for every run is high to get results. Now I'm using MATLAB but I want to change coding language. Which program do you suggest?
    Simon Schröder · Fraunhofer Institute for Industrial Mathematics ITWM

    @Paul: I recently had an advanced Fortran course held by a member of the standardization committee. I also used to say "use modern Fortran". But, what he taught us it that many modern features in Fortran (post Fortran 95) only kill performance. He advised us to never use these unless in performance-uncritical code. Maybe numerics is an afterthought in C and C++, but object oriented programming (OOP) is an afterthought in Fortran. As it turns out OOP does not play well with Fortran, whereas numerics can play well with C++. Although matrices are not built into C++ as in Fortran, there are good libraries which prevent you from writing loops. Some of these libraries even do optimizations that the compiler cannot do, e.g. avoiding temporaries and avoiding additional loops when chaining mathematical operations. This goes far beyond a simple DAXPY. With the same simple syntax that you have in Fortran you can have optimizations which are not possible in Fortran. The approach of C++ is not to cram everything into the language, but instead use libraries wherever there is no performance penalty because of this approach. In C++ language syntax cannot make matrices more efficient than they already are with libraries.

    Finally, it is the algorithms and the data structures that decide over performance the most and not just the language. I agree that C++ is harder to master than Fortran, and you can make many stupid mistakes which screw up performance. Using existing libraries will prevent you from making most of these mistakes. Since the algorithms are most important, you should use the language you know best. This will result in the best performing code that you can write.

    PS: Fortran sometimes prevents you from using good algorithms because you have to reinvent the wheel and implement the algorithm yourself. Often people will then choose algorithms with worse complexity classes because they are easier to implement. To give an example of this see this Youtube video about Python vs. Fortran:

  • Naveen Kumar Boiroju added an answer:
    How to approximate the cdf of t-distribution efficiently?
    Approximation of t distribution is essential for finding the p-value in a computer program (while testing the hypothesis about the means). Is it enough to have three decimal point accuracy of the approximation? How many decimals should be correctly approximated by a function? Finally, how to approximate the cdf of t-distribution efficiently? Please suggest some thoughts on the same. Thank you.
    Naveen Kumar Boiroju · Osmania University

    Thank you Wilson

  • Ivana Oleksakova added an answer:
    I am looking for software for simulation of wind for Mac OS.
    I am looking for software for wind simulation for Mac OS. I use Ansys but I heard that there is no version for Mac. Is there any other software that you are satisfied with using? Is there a free version for students?
    Ivana Oleksakova · Slovak University of Technology in Bratislava

    Thanks..I am already learning to work in OpenFOAM... but I will check Comsol as well :)

About Simulation and Modeling

The focus of this group are the methods and tools for modeling and simulation.

Topic Followers (19224) See all