Dear all,
I am trying to connect a function-file in MATLAB to Simulink via 2nd level S-function. But I have a global variable defined in my function file.
Can anyone let me know, how to declare global variables in S-functions?
thank you.
Dear;
This is realized through the option Simulation parameters in the menu Simulation and choosing Advanced, inline parameters and click in Configure. Then specify the variable as Global parameter.
Thank you Wasim Soliman. I will surely try with this.
try this
function [sys,x0,str,ts]=Crane(t,x,u,flag)
global mp mr mc K1 K2 K3 mu1 mu2 g
mp=1;
mr=1;
mc=14;
g=9.81;
K1=350;
K2=375;
K3=416;
mu1=mp/mc;
mu2=mp/(mc+mr);
I have a tube with a fixed inside thickness. Now, I want to change thickness of some part of this tube to X mm and some part to Y mm. Rest of the part has no change. Moreover, the parts of...
02 March 2019 7,794 3 View
I recently saw an example of water-hammering effect example of COMSOL Multiphysics. The example shows that the sudden closing of a valve produces pressure-shock through out the pipe upstream to...
31 December 2018 1,553 3 View
I'm simulating a shell and tube heat exchanger in comsol . I am plugging some of the tubes within the structure to see its effect on del.P and temperature. When I plug 18 of 19 tubes, and one...
09 October 2018 9,912 4 View
Dear all, I want to know about the wall lift off in CFD simulations What's it's significance and why they are different in FEM and FVM? Moreover, if it only depends on meaning, then why in...
08 September 2018 4,895 0 View
I have a doubt: A : 1. If a parameter value (say 'x = 100 ') is changed in model via Matlab-Livelink (via Matlab coding) 2. model is run. After it, B : 1. Again the paramater value is changed...
07 August 2018 6,431 0 View
I have simulated a heat-exchanger in COMSOL. The same heat-exchanger is simulated (with the exact geometry ) in Aspen Plus. I'm facing following problems in above: 1. The results of Aspen Plus...
06 July 2018 6,118 0 View
I have a shell and tube heat exchanger (1-1 pass ). It has shell of 250 mm ID and tubes of 50 mm ID (# 19). Length is 500 mm. I want to know the time-constant for this heat-exchanger (approx....
05 June 2018 1,247 0 View
Hello, I want to add an external material to the COMSOL for simulation. How can we do it? thanks.
04 May 2018 4,149 0 View
Dear all, I want to use the S-function in Simulink to connect it to COMSOL. I am able to use the Livelink and can import COMSOL model to MATLAB and can access the results. But my problem is as...
03 April 2018 9,752 1 View
Dear all, I am trying to co-simulate a chemical process in two-different environment. One is Aspen Plus and another is an CFD based simulator. The process has different units to be simulated in...
02 March 2018 4,591 4 View
Can anyone explain this method? Especially the last statement where it says only at 1.5 to 2.5mins was the MS/MS connected to the UPLC. How is that possible, is it a feature in this specific...
11 August 2024 8,141 3 View
How do interactions between the biosphere, the carbon cycle, and the water cycle impact global warming and interaction between the atmosphere and the hydrosphere?
09 August 2024 3,291 2 View
Evolutionary fitness is based on an organism’s ability to adapt rapidly to changing environmental circumstances. Large-bodied mammals have been equipped with large brains (and hence a high...
06 August 2024 4,849 2 View
I am analyzing cherts from different sources found within one specific geologic formation using ICP-MS/ES. My committee was asking this question about my analysis. I was not sure how to answer this
05 August 2024 7,902 3 View
I am currently researching the impact of environmental toxins on children's health and would greatly appreciate insights from experts in the field. If you are an expert or researcher working on...
02 August 2024 2,627 1 View
I want to know that n-doped side of solar cell is connected with positive or negative electrode.
20 July 2024 1,348 2 View
Let n∈ℕ, where the function f:A⊆ℝ𝑛→ℝ, 𝐴 is Borel, and (A,d) is a completely seperable space. What is the name of the functions where the graph of f in any (n+1)-dimensional box of A×ℝ is...
17 July 2024 258 1 View
I studying PhD course in Urban design for Health. I need to know in some fileds: residental block, green open space and Transport TOD. I need connect with expert in that fileds.
14 July 2024 1,892 3 View
I have a Simulink model that connected a main utility (AC-grid) with a three-phase load changing from 20kW to 100kW in 5 seconds and I don't know how to build this load in Simulink. Please your...
14 July 2024 8,892 3 View
What global health problem does your research address? Why does it demand an urgent solution?
05 July 2024 6,163 7 View