Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.
Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
COMSOL 4.0 - Linear Extrusion
Posted 21 lug 2010, 12:05 GMT-4 Version 4.1, Version 4.2, Version 4.4 19 Replies
Please login with a confirmed email address before reporting spam
I understand how to set up the source and destination vertices just fine. However, one glaring difference in 4.0 is the lack of ability to select which variable to map from one geometry to the next! Where do I tell it to map the variable "c1?" Is the chosen "operator name" a function for which I can call with an expression as its argument for what to map? I don't think this is true because it gives me an error stating unknown function found.
So, having the source and destination vertices set up, how do I tell 4.0 which variable I want to map?
Thanks for the help,
Mark
Please login with a confirmed email address before reporting spam
After learning version 3.5a, I was forced to jump into version 4.0 and have not had a good experience with the "upgrade." Making a linear extrusion from a 1D geometry to a 2D geometry in 3.5a was trivial and made perfect sense. What am I missing in 4.0?
I understand how to set up the source and destination vertices just fine. However, one glaring difference in 4.0 is the lack of ability to select which variable to map from one geometry to the next! Where do I tell it to map the variable "c1?" Is the chosen "operator name" a function for which I can call with an expression as its argument for what to map? I don't think this is true because it gives me an error stating unknown function found.
So, having the source and destination vertices set up, how do I tell 4.0 which variable I want to map?
Thanks for the help,
Mark
Hi Mark,
The operator you want to map should be given as argument to the function.
For instance, if you want to apply the linear extrusion to temperature, you enter:
linext1(T)
Where linext1 is the name of the Linear extrusion.
It's important to remember this, because the entire v4.0 functional interface works like this. Once you know and have gotten used to it, you will find the tremendous advantage that you don't have to define a function/extrusion/integration operater/whatever you want for every individual expression.
A quick remark on the expressions: we've switched sequence in the nomenclature.
For instance, in v3.5a, current density in x-direction was something like normJ.emdc, while in v4.0 it's: ec.normJ.
Now, the physics type (Electric Currents or ec) is in the front, followed by the quantity. This is similar to Java name ordering. If you're not sure about the exact name of a parameter, go to a plot group and look at the expressions you can plot - the names are listed there.
Best regards,
Ruud Borger
Comsol
Please login with a confirmed email address before reporting spam
Thanks for the explanations, I believe you should wright a couple of chapter on these changes in your doc, I see many frustrated users just because they do not understand these improvements (because I agree its more logical and just as easy if not better than 3.5a). Personally I was lucky having some free time to learn first, as normally my boss asks for results from the first second after any upgrade ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
To be more clear, I am using the linear extrusion to pass values between two geometries (a 1D domain and a 2D boundary). These two geometries are in two different models (in the same file of course) because I could not find a way to 'add a geometry' to "Model 1." Assuming this is the correct setup, these are following questions:
To translate a variable, say T, from geometry A (1D) to geometry B (2D), I believe the linear extrusion must be created under the definitions for the model containing geometry A. The destination is then set to geometry B with the selected boundary. Once the verticies are matched up appropriately, the linear extrusion operator should be called with the variable T as an argument - linex1(T) - for example. If this is true, where does this calling of the extrusion function occur? If it occurs in geometry B, the error "Unknown Function" appears because the linear extrusion operator is not defined in this model. If a variable is set to the extrusion value, like T1 = linex1(T), and this new variable is called in geometry B, the error "Unknown Variable" appears.
I feel like I have it setup correctly, but cannot get it to work - either there is a way to create a second geometry that will clear this all up, or I have something fundamentally wrong.
Your input is appreciated. Thanks!
Mark
Please login with a confirmed email address before reporting spam
you need to look at the model tree, it starts at root.mod1.etc and root.mod2.etc if you refer to an element far down in the tree from another branch, then you must give enough names.subname.etc to get the definition unambiguous (a la Java programming). So you might need to add some prefixes before your operator name to have it correctly defined in your current subnode.
I usually go to the results (if I have managed to solve it) and test the variable names from there
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Hei Borger
Thanks for the explanations, I believe you should wright a couple of chapter on these changes in your doc, I see many frustrated users just because they do not understand these improvements (because I agree its more logical and just as easy if not better than 3.5a). Personally I was lucky having some free time to learn first, as normally my boss asks for results from the first second after any upgrade ;)
--
Good luck
Ivar
Thanks!
We are working on improving them.
Please login with a confirmed email address before reporting spam
I am using general extrusion and I could not get anything going...with a model prepared in 4.0a. I see you are having difficulties. and cannot get your model going.
After getting some help from support to convert a working 3.5a model to 4.0a, I look at various elements and realized that in model2, my physics interface had a name different that on my model 1 ( in my case acdc, i had ec for model 1 and ec2 for model2).
I renamed the physics interface ec (not obvious that this is allowed!!!)
Not enough because the dependent variable (in my case V, in yours T I presume) was named automatically V2 in the physics interface ( in your case I would presume T2).
So I rename the dependent variable in model2 , V.
This is all done very discreetly by the programme! a real trap. And the help is really not good enough.
Could be you overlooked this detail, I did for several days.....trying what I thought was everything possible.
Good luck.
Also you should get 4.0a and apply the hot fix on top of that.
Please login with a confirmed email address before reporting spam
As I'm using the options parameters equation on, I mostly catch these effects by looking on the imported equations (then too you learn alot on how COMSOl expected us to use the different nodes)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Please, please, please, put some use cases in your documentation, guys! These forums aren't really active enough to be a good substitute for the documentation (as opposed to, say, Matlab).
Please login with a confirmed email address before reporting spam
Please login with a confirmed email address before reporting spam
What I was really looking for was the bit given on page 163 of the PDF user's guide, where it actually describes what exact syntax you would type in to use the coupling operators.
Please login with a confirmed email address before reporting spam
My domain is a 3D bloc (L*W*H), I calculate a variable C (x, y, z) in this domain.
I need to define a parameter Cs (x, y) on one face of the bloc (z=0) as the integration of C along the normal axis (z) of that face. Cs (x, y) = $(from z=0 to z=H) C(x, y, z) dz
Cs will be used in the calculation of C.
So should I define an integration? an Extrusion? is it possible?
I never understood extrusions. I though I did once, and I used it, but then I forgot, I think it is really uninuitive unclear function of COmsol:
Thanks for any help!!!
Please login with a confirmed email address before reporting spam
It's rather the projection operator you should use that integrates over the last variable (if you want an average, divide by the total line length
I have attached a simple example hereby but its 4.2a ;)
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
--
Good luck
Ivar
Attachments:
Please login with a confirmed email address before reporting spam
Thanks a lot! Your help is very much appreciated.
So in this case I should define Cs=genproj1(C) right?
BTW Why is it integration order 4?
PS: thanks for the information and solving my problem, but in the general case, how do I know if I need a projection or an extrusion, linear or general....? is it like 3D -> 2D = projection and 2D ->3D = extrusion? I mean what is the reason to choose those names? for me in real life, a projector takes a 2D picture and projects it in a 3D domain, pretty much the same as an extrusion, which translates a 2D shape to form a 3D volume... I'm not a native english speaker but those words are not clear to me...
Please login with a confirmed email address before reporting spam
you can use both (generic or specific), but their set-up is slightly different, in one you use the geometry (points/vertex) in the 2nd you use the generic coordinate system topdefine the orientations and the integrand.
Note: both of them perform an integration hence you add a *1[m] on the units from the ds term. This is OK for flux or density variables, for global variables when you want an average output, you need to normalise by the integration length.
Projection and extrusion are opposite (in some sens) operations. The best is to carefully read the doc (2-3 times ;) it has taken me quite some time to catch the essence behind these operators, but I have still not found a simpler way to explain how it works, and I still make small examples as the previous posted one to check that I get the right operator and that I use it correctly
--
Good luck
Ivar
Please login with a confirmed email address before reporting spam
I read the discussion above, about unknown variable error. I have the same problem till I change the models and interfaces (in my case, General form PDE) names to a same one. Am I allowed to do that?
Thanks,
Please login with a confirmed email address before reporting spam
The boundary from the 2D geometry and the 1D geometry have exactly the same shape and length. The destination of the extrusion from the 2D geometry is : comp2.x and the destination of the 1D geometry is: comp1.x
The program tries to run and I get:
Internal error in error handling
-Message: coordevalfail
Any suggestions???
Thanks!
Trevor
Please login with a confirmed email address before reporting spam
After learning version 3.5a, I was forced to jump into version 4.0 and have not had a good experience with the "upgrade." Making a linear extrusion from a 1D geometry to a 2D geometry in 3.5a was trivial and made perfect sense. What am I missing in 4.0?
I understand how to set up the source and destination vertices just fine. However, one glaring difference in 4.0 is the lack of ability to select which variable to map from one geometry to the next! Where do I tell it to map the variable "c1?" Is the chosen "operator name" a function for which I can call with an expression as its argument for what to map? I don't think this is true because it gives me an error stating unknown function found.
So, having the source and destination vertices set up, how do I tell 4.0 which variable I want to map?
Thanks for the help,
Mark
Hi Mark,
The operator you want to map should be given as argument to the function.
For instance, if you want to apply the linear extrusion to temperature, you enter:
linext1(T)
Where linext1 is the name of the Linear extrusion.
It's important to remember this, because the entire v4.0 functional interface works like this. Once you know and have gotten used to it, you will find the tremendous advantage that you don't have to define a function/extrusion/integration operater/whatever you want for every individual expression.
A quick remark on the expressions: we've switched sequence in the nomenclature.
For instance, in v3.5a, current density in x-direction was something like normJ.emdc, while in v4.0 it's: ec.normJ.
Now, the physics type (Electric Currents or ec) is in the front, followed by the quantity. This is similar to Java name ordering. If you're not sure about the exact name of a parameter, go to a plot group and look at the expressions you can plot - the names are listed there.
Best regards,
Ruud Borger
Comsol
Hi,
I have a problem with 4.4 when using the Linear Extrusion.
in the Linear Extrusion, the rectangle plane in Geom1 is wanted to be extracted to a same size rectangle in Geom2.
My problem is that in the source Vertices , 4 points can be selected while in the Destination Vertices only 3 points could be selected.
Please can you show me why? or my fault?
Please login with a confirmed email address before reporting spam
This question is getting a little bit far removed from the original posting. Your latest posting would be best suited for a new, unique, thread. Your question will be easier to address if you also attach a simple, representative, model file that can be used for illustrative purposes.
We do also suggest that you upgrade to COMSOL version 5.0 at your convenience.
Best Regards,
Walter
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.
Suggested Content
- FORUM Issues when solving linear system in Frequency Domain study step when removing symmetry BCs
- FORUM Multi-turn coil - Linear analysed with sinusoidal current in a transient study.
- BLOG Modeling Linear Motors or Generators in COMSOL Multiphysics
- KNOWLEDGE BASE Maximum number of linear iterations reached
- BLOG Accessing Nonlocal Variables with Linear Extrusion Operators